Skip to content

Commit

Permalink
Standardize display for builtin functions
Browse files Browse the repository at this point in the history
  • Loading branch information
CeleritasCelery committed Feb 9, 2024
1 parent 9265858 commit a0d13b2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/core/object/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self> {
// The spec is an integer of the form NNNNNNNRMMMMMMM where the 7bit
Expand Down Expand Up @@ -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, "#<subr {}>", &self.name)
}
}

Expand Down

0 comments on commit a0d13b2

Please sign in to comment.