diff options
Diffstat (limited to 'src/library/text')
| -rw-r--r-- | src/library/text/link.rs | 4 | ||||
| -rw-r--r-- | src/library/text/raw.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/library/text/link.rs b/src/library/text/link.rs index 740426a3..c4898eb0 100644 --- a/src/library/text/link.rs +++ b/src/library/text/link.rs @@ -33,7 +33,7 @@ impl LinkNode { castable! { Destination, Expected: "string or dictionary with `page`, `x`, and `y` keys", - Value::Str(string) => Self::Url(string), + Value::Str(string) => Self::Url(string.into()), Value::Dict(dict) => { let page = dict.get("page")?.clone().cast()?; let x: RawLength = dict.get("x")?.clone().cast()?; @@ -54,7 +54,7 @@ impl Show for LinkNode { fn encode(&self, _: StyleChain) -> Dict { dict! { "url" => match &self.dest { - Destination::Url(url) => Value::Str(url.clone()), + Destination::Url(url) => Value::Str(url.clone().into()), Destination::Internal(loc) => Value::Dict(loc.encode()), }, "body" => match &self.body { diff --git a/src/library/text/raw.rs b/src/library/text/raw.rs index 8db4cf3e..e64636f8 100644 --- a/src/library/text/raw.rs +++ b/src/library/text/raw.rs @@ -50,10 +50,10 @@ impl Show for RawNode { fn encode(&self, styles: StyleChain) -> Dict { dict! { - "text" => Value::Str(self.text.clone()), + "text" => Value::Str(self.text.clone().into()), "block" => Value::Bool(self.block), "lang" => match styles.get(Self::LANG) { - Some(lang) => Value::Str(lang.clone()), + Some(lang) => Value::Str(lang.clone().into()), None => Value::None, }, } |
