From a0d13b2d7dc9c9116b61ea85f5f0a5117a15b1a2 Mon Sep 17 00:00:00 2001 From: Troy Hinckley Date: Thu, 8 Feb 2024 22:47:27 -0600 Subject: [PATCH] Standardize display for builtin functions --- src/core/object/func.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/core/object/func.rs b/src/core/object/func.rs index f88283c1..3d2eda35 100644 --- a/src/core/object/func.rs +++ b/src/core/object/func.rs @@ -122,12 +122,6 @@ pub(crate) struct FnArgs { pub(crate) advice: bool, } -impl Display for FnArgs { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "({} {} {})", self.required, self.optional, self.rest) - } -} - impl FnArgs { pub(crate) fn from_arg_spec(spec: u64) -> Result { // The spec is an integer of the form NNNNNNNRMMMMMMM where the 7bit @@ -202,7 +196,7 @@ impl<'new> WithLifetime<'new> for &SubrFn { impl Display for SubrFn { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "(Builtin: {} -> {})", &self.name, self.args) + write!(f, "#", &self.name) } }