diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-12-09 13:42:52 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-12-09 13:42:52 +0100 |
| commit | fe21c4d399d291e75165b664762f0aa8bdc4724a (patch) | |
| tree | a3ec954df6e66f6504f4416b37600cedf95dd7e1 /src/eval/value.rs | |
| parent | 40b87d4066fe85cb3fde6cf84cd60d748273ae25 (diff) | |
Set Rules Episode III: Revenge of the packer
Diffstat (limited to 'src/eval/value.rs')
| -rw-r--r-- | src/eval/value.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/eval/value.rs b/src/eval/value.rs index a6230956..c2a284eb 100644 --- a/src/eval/value.rs +++ b/src/eval/value.rs @@ -108,8 +108,8 @@ impl Value { format_eco!("{:?}", self) } - /// Return the display representation of a value in form of a node. - pub fn display(self) -> Node { + /// Return the display representation of the value. + pub fn show(self) -> Node { match self { Value::None => Node::new(), Value::Int(v) => Node::Text(format_eco!("{}", v)), @@ -118,8 +118,7 @@ impl Value { Value::Node(v) => v, // For values which can't be shown "naturally", we print the // representation in monospace. - // TODO(set): Styled in monospace. - v => Node::Text(v.repr()), + v => Node::Text(v.repr()).monospaced(), } } } |
