diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-01-28 12:01:05 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-01-28 12:14:03 +0100 |
| commit | 28c554ec2185a15e22f0408ce485ed4afe035e03 (patch) | |
| tree | 622d2d281133c4e6b92633e44bfc1e1301250fb4 /src/model/cast.rs | |
| parent | 23238d4d44881a5b466ab23a32e2a7447f460127 (diff) | |
Rework math attachments and accents
Diffstat (limited to 'src/model/cast.rs')
| -rw-r--r-- | src/model/cast.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/model/cast.rs b/src/model/cast.rs index 17ed2d30..0da9906f 100644 --- a/src/model/cast.rs +++ b/src/model/cast.rs @@ -233,6 +233,17 @@ castable! { } castable! { + char, + string: Str => { + let mut chars = string.chars(); + match (chars.next(), chars.next()) { + (Some(c), None) => c, + _ => Err("expected exactly one character")?, + } + }, +} + +castable! { EcoString, string: Str => string.into(), } |
