summaryrefslogtreecommitdiff
path: root/src/eval/func.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-05-04 22:14:57 +0200
committerLaurenz <laurmaedje@gmail.com>2022-05-04 22:14:57 +0200
commite674fd7e909c273c36952f01829544a2efc11c92 (patch)
treec74218ce4a546de06b28aad2f73ba460338252b7 /src/eval/func.rs
parent75472fee1a2377f56551fc856cf7511bd55091f0 (diff)
New raw theme & nicer debug representation
Diffstat (limited to 'src/eval/func.rs')
-rw-r--r--src/eval/func.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/eval/func.rs b/src/eval/func.rs
index 7e4040b6..b72e9f18 100644
--- a/src/eval/func.rs
+++ b/src/eval/func.rs
@@ -1,4 +1,4 @@
-use std::fmt::{self, Debug, Formatter, Write};
+use std::fmt::{self, Debug, Formatter};
use std::hash::{Hash, Hasher};
use std::sync::Arc;
@@ -119,12 +119,10 @@ impl Func {
impl Debug for Func {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
- f.write_str("<function")?;
- if let Some(name) = self.name() {
- f.write_char(' ')?;
- f.write_str(name)?;
+ match self.name() {
+ Some(name) => f.write_str(name),
+ None => f.write_str("(..) => {..}"),
}
- f.write_char('>')
}
}