Skip to content

Commit

Permalink
remove generic param from call
Browse files Browse the repository at this point in the history
  • Loading branch information
willox committed Mar 30, 2021
1 parent ea9ff0c commit f2a16c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions auxtools/src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ impl Value {
/// ```ignore
/// src.call("explode", &[&Value::from(3.0)]);
/// ```
pub fn call<S: AsRef<str>, V: AsRef<Self>>(&self, procname: S, args: &[V]) -> DMResult {
pub fn call<S: AsRef<str>>(&self, procname: S, args: &[&Value]) -> DMResult {
let mut ret = raw_types::values::Value {
tag: raw_types::values::ValueTag::Null,
data: raw_types::values::ValueData { id: 0 },
Expand All @@ -237,11 +237,11 @@ impl Value {
unsafe {
// Increment ref-count of args permenently before passing them on
for v in args {
raw_types::funcs::inc_ref_count(v.as_ref().raw);
raw_types::funcs::inc_ref_count(v.raw);
}

let procname = String::from(procname.as_ref()).replace("_", " ");
let mut args: Vec<_> = args.iter().map(|e| e.as_ref().raw).collect();
let mut args: Vec<_> = args.iter().map(|e| e.raw).collect();
let name_ref = string::StringRef::new(&procname)?;

if raw_types::funcs::call_datum_proc_by_name(
Expand Down

0 comments on commit f2a16c7

Please sign in to comment.