diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-01-08 11:57:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-08 10:57:56 +0000 |
| commit | dacd6acd5e73d35c6e7a7a3b144f16ae70d03daa (patch) | |
| tree | ca75ce7d4d5365fbe2424a356cefe9cb223d429f /tests/src/world.rs | |
| parent | 0a374d238016c0101d11cbc3f4bc621f3895ad36 (diff) | |
More flexible and efficient `Bytes` representation (#5670)
Diffstat (limited to 'tests/src/world.rs')
| -rw-r--r-- | tests/src/world.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/src/world.rs b/tests/src/world.rs index a08f1efa..5c267832 100644 --- a/tests/src/world.rs +++ b/tests/src/world.rs @@ -98,7 +98,7 @@ impl Default for TestBase { fn default() -> Self { let fonts: Vec<_> = typst_assets::fonts() .chain(typst_dev_assets::fonts()) - .flat_map(|data| Font::iter(Bytes::from_static(data))) + .flat_map(|data| Font::iter(Bytes::new(data))) .collect(); Self { @@ -140,8 +140,8 @@ impl FileSlot { self.file .get_or_init(|| { read(&system_path(self.id)?).map(|cow| match cow { - Cow::Owned(buf) => buf.into(), - Cow::Borrowed(buf) => Bytes::from_static(buf), + Cow::Owned(buf) => Bytes::new(buf), + Cow::Borrowed(buf) => Bytes::new(buf), }) }) .clone() |
