summaryrefslogtreecommitdiff
path: root/src/eval/dict.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-12-27 20:45:20 +0100
committerLaurenz <laurmaedje@gmail.com>2020-12-27 20:45:20 +0100
commitba3d43f7b2a18984be27f3d472884a19f3adce4c (patch)
tree1c6ffa31145fb69c19319440969d2037b27b584f /src/eval/dict.rs
parent750d220bb080be077cd7ede6d18d485b1c3fb0c9 (diff)
Refresh function call and dictionary syntax
- No colon between function name and arguments, just whitespace - "Named" arguments (previously "keyword" arguments) use colon instead of equals sign
Diffstat (limited to 'src/eval/dict.rs')
-rw-r--r--src/eval/dict.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/eval/dict.rs b/src/eval/dict.rs
index 1374c840..efa5cb37 100644
--- a/src/eval/dict.rs
+++ b/src/eval/dict.rs
@@ -160,11 +160,9 @@ impl<V: Debug> Debug for Dict<V> {
if self.0 {
f.write_str("\"")?;
}
- if f.alternate() {
- f.write_str(" = ")?;
- } else {
- f.write_str("=")?;
- }
+
+ f.write_str(": ")?;
+
self.2.fmt(f)
}
}
@@ -511,13 +509,13 @@ mod tests {
dict.insert("sp ace", "quotes");
assert_eq!(
format!("{:?}", dict),
- r#"(10="hello", "sp ace"="quotes", twenty="there")"#,
+ r#"(10: "hello", "sp ace": "quotes", twenty: "there")"#,
);
assert_eq!(format!("{:#?}", dict).lines().collect::<Vec<_>>(), [
"(",
- r#" 10 = "hello","#,
- r#" "sp ace" = "quotes","#,
- r#" twenty = "there","#,
+ r#" 10: "hello","#,
+ r#" "sp ace": "quotes","#,
+ r#" twenty: "there","#,
")",
]);
}