mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
Replace val_to_string with to_string (via fmt::Display)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use std::fmt;
|
||||
use std::rc::Rc;
|
||||
|
||||
use num_bigint::BigInt;
|
||||
@@ -18,9 +19,6 @@ impl ValTrait for NativeFrameFunction {
|
||||
fn typeof_(&self) -> VsType {
|
||||
VsType::Function
|
||||
}
|
||||
fn val_to_string(&self) -> String {
|
||||
"function() { [native code] }".to_string()
|
||||
}
|
||||
fn to_number(&self) -> f64 {
|
||||
f64::NAN
|
||||
}
|
||||
@@ -81,3 +79,9 @@ impl ValTrait for NativeFrameFunction {
|
||||
"function() { [native code] }".into()
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for NativeFrameFunction {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "function() {{ [native code] }}")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user