diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-05-11 10:50:30 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-05-11 10:50:30 +0200 |
| commit | 47dff3765de863554ca296448555599fc50d4a8a (patch) | |
| tree | f632073bd800466d94dae7d19b1d4e28e80ff743 /library/src/meta | |
| parent | d9ba84085e36036409c919cff2e3eb3d126e3bb3 (diff) | |
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.
Diffstat (limited to 'library/src/meta')
| -rw-r--r-- | library/src/meta/bibliography.rs | 6 | ||||
| -rw-r--r-- | library/src/meta/counter.rs | 2 | ||||
| -rw-r--r-- | library/src/meta/state.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/library/src/meta/bibliography.rs b/library/src/meta/bibliography.rs index c3046dfc..cdb6a5d6 100644 --- a/library/src/meta/bibliography.rs +++ b/library/src/meta/bibliography.rs @@ -121,7 +121,7 @@ impl BibliographyElem { /// Find all bibliography keys. pub fn keys( - world: Tracked<dyn World>, + world: Tracked<dyn World + '_>, introspector: Tracked<Introspector>, ) -> Vec<(EcoString, Option<EcoString>)> { Self::find(introspector) @@ -426,7 +426,7 @@ impl Works { /// Generate all citations and the whole bibliography. #[comemo::memoize] fn create( - world: Tracked<dyn World>, + world: Tracked<dyn World + '_>, bibliography: BibliographyElem, citations: Vec<CiteElem>, ) -> Arc<Works> { @@ -582,7 +582,7 @@ fn create( /// Load bibliography entries from a path. #[comemo::memoize] fn load( - world: Tracked<dyn World>, + world: Tracked<dyn World + '_>, paths: &BibPaths, ) -> StrResult<EcoVec<hayagriva::Entry>> { let mut result = EcoVec::new(); diff --git a/library/src/meta/counter.rs b/library/src/meta/counter.rs index 394c4656..50a097af 100644 --- a/library/src/meta/counter.rs +++ b/library/src/meta/counter.rs @@ -405,7 +405,7 @@ impl Counter { #[comemo::memoize] fn sequence_impl( &self, - world: Tracked<dyn World>, + world: Tracked<dyn World + '_>, tracer: TrackedMut<Tracer>, provider: TrackedMut<StabilityProvider>, introspector: Tracked<Introspector>, diff --git a/library/src/meta/state.rs b/library/src/meta/state.rs index 71c65125..b466bd66 100644 --- a/library/src/meta/state.rs +++ b/library/src/meta/state.rs @@ -320,7 +320,7 @@ impl State { #[comemo::memoize] fn sequence_impl( &self, - world: Tracked<dyn World>, + world: Tracked<dyn World + '_>, tracer: TrackedMut<Tracer>, provider: TrackedMut<StabilityProvider>, introspector: Tracked<Introspector>, |
