diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-11-27 00:49:02 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-11-27 01:00:57 +0100 |
| commit | 7caf98fe42797eab59a39ef71071030c9790245a (patch) | |
| tree | cadf45a53aad29f11bf30a164f646b5a73bb5f16 /library/src | |
| parent | 6bafc6391061d4b589dea835705a08b25a4df9f8 (diff) | |
Switch `StrResult` to `EcoString`
Diffstat (limited to 'library/src')
| -rw-r--r-- | library/src/layout/page.rs | 2 | ||||
| -rw-r--r-- | library/src/structure/list.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/src/layout/page.rs b/library/src/layout/page.rs index 9d5d4f56..42db02c3 100644 --- a/library/src/layout/page.rs +++ b/library/src/layout/page.rs @@ -196,7 +196,7 @@ impl Cast<Spanned<Value>> for Marginal { Value::Str(v) => Ok(Self::Content(TextNode::packed(v))), Value::Content(v) => Ok(Self::Content(v)), Value::Func(v) => Ok(Self::Func(v, value.span)), - v => Err(format!( + v => Err(format_eco!( "expected none, content or function, found {}", v.type_name(), )), diff --git a/library/src/structure/list.rs b/library/src/structure/list.rs index 462e0c32..6bfddd2e 100644 --- a/library/src/structure/list.rs +++ b/library/src/structure/list.rs @@ -263,7 +263,7 @@ impl Cast<Spanned<Value>> for Label { Value::Str(v) => Ok(Self::Pattern(v.parse()?)), Value::Content(v) => Ok(Self::Content(v)), Value::Func(v) => Ok(Self::Func(v, value.span)), - v => Err(format!( + v => Err(format_eco!( "expected string, content or function, found {}", v.type_name(), )), |
