Change lib to &[Shared<Module>] and remove dummy lifetimes.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
use crate::func::{CallableFunction, StraightHashMap};
|
||||
use crate::types::BloomFilterU64;
|
||||
use crate::{ImmutableString, StaticVec};
|
||||
use std::marker::PhantomData;
|
||||
#[cfg(feature = "no_std")]
|
||||
use std::prelude::v1::*;
|
||||
|
||||
@@ -45,21 +44,18 @@ impl FnResolutionCache {
|
||||
/// The following caches are contained inside this type:
|
||||
/// * A stack of [function resolution caches][FnResolutionCache]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Caches<'a> {
|
||||
pub struct Caches {
|
||||
/// Stack of [function resolution caches][FnResolutionCache].
|
||||
stack: StaticVec<FnResolutionCache>,
|
||||
/// Take care of the lifetime parameter.
|
||||
dummy: PhantomData<&'a ()>,
|
||||
}
|
||||
|
||||
impl Caches<'_> {
|
||||
impl Caches {
|
||||
/// Create an empty [`Caches`].
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub const fn new() -> Self {
|
||||
Self {
|
||||
stack: StaticVec::new_const(),
|
||||
dummy: PhantomData,
|
||||
}
|
||||
}
|
||||
/// Get the number of function resolution cache(s) in the stack.
|
||||
|
Reference in New Issue
Block a user