From 47dff3765de863554ca296448555599fc50d4a8a Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 11 May 2023 10:50:30 +0200 Subject: Remove 'static bound on `World` Thanks to improvements in comemo, tracked types don't need to be 'static anymore. This means that the 'static bound on the `World` is now lifted and that the `Route` doesn't need to use unsafe code anymore to manage its lifetime. --- src/image.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/image.rs') diff --git a/src/image.rs b/src/image.rs index d78c7428..f9974599 100644 --- a/src/image.rs +++ b/src/image.rs @@ -53,7 +53,7 @@ impl Image { pub fn with_fonts( data: Buffer, format: ImageFormat, - world: Tracked, + world: Tracked, fallback_family: Option<&str>, alt: Option, ) -> StrResult { @@ -240,7 +240,7 @@ fn decode_svg(data: &Buffer) -> StrResult> { #[comemo::memoize] fn decode_svg_with_fonts( data: &Buffer, - world: Tracked, + world: Tracked, fallback_family: Option<&str>, ) -> StrResult> { let mut opts = usvg::Options::default(); @@ -269,7 +269,7 @@ fn decode_svg_with_fonts( /// Discover and load the fonts referenced by an SVG. fn load_svg_fonts( tree: &usvg::Tree, - world: Tracked, + world: Tracked, fallback_family: Option<&str>, ) -> fontdb::Database { let mut referenced = BTreeMap::::new(); -- cgit v1.2.3