summaryrefslogtreecommitdiff
path: root/src/library/text.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-01-31 16:06:44 +0100
committerLaurenz <laurmaedje@gmail.com>2022-01-31 16:47:00 +0100
commit20b1a38414101f842a6d9201133a5aaaa45a7cec (patch)
tree2365453d4dfdebfa11d618baad1a36c65b62d7c7 /src/library/text.rs
parentfa57d86ed981373b66804972147bf59cab920e6b (diff)
Switch from `Rc` to `Arc`
Diffstat (limited to 'src/library/text.rs')
-rw-r--r--src/library/text.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/text.rs b/src/library/text.rs
index 6d7be323..c6c1ab80 100644
--- a/src/library/text.rs
+++ b/src/library/text.rs
@@ -55,7 +55,7 @@ impl TextNode {
#[fold(|a, b| a.into_iter().chain(b).collect())]
pub const LINES: Vec<Decoration> = vec![];
/// An URL the text should link to.
- pub const LINK: Option<String> = None;
+ pub const LINK: Option<EcoString> = None;
/// The size of the glyphs.
#[fold(Linear::compose)]
@@ -211,12 +211,12 @@ castable! {
/// A specific font family like "Arial".
#[derive(Clone, Eq, PartialEq, Hash)]
-pub struct NamedFamily(String);
+pub struct NamedFamily(EcoString);
impl NamedFamily {
/// Create a named font family variant.
pub fn new(string: &str) -> Self {
- Self(string.to_lowercase())
+ Self(string.to_lowercase().into())
}
/// The lowercased family name.