Skip to content

Commit

Permalink
add the lifetime indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
steelgeek091 committed Dec 26, 2024
1 parent 3fd5dc2 commit 9b8f286
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moveos/moveos-types/src/state_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ pub trait StateReader: StateResolver {

impl<R> StateReader for R where R: StateResolver {}

pub trait AnnotatedStateReader: StateReader + MoveResolver where &Self: CompiledModuleView {
pub trait AnnotatedStateReader: StateReader + MoveResolver where for<'a> &'a Self: CompiledModuleView {
fn get_annotated_states(&self, path: AccessPath) -> Result<Vec<Option<AnnotatedState>>> {
let annotator = MoveValueAnnotator::new(self);
self.get_states(path)?
Expand Down Expand Up @@ -397,7 +397,7 @@ pub trait AnnotatedStateReader: StateReader + MoveResolver where &Self: Compiled
}
}

impl<T> AnnotatedStateReader for T where T: StateReader + MoveResolver {}
impl<T> AnnotatedStateReader for T where T: StateReader + MoveResolver, for<'a> &'a T: CompiledModuleView {}

pub trait StateReaderExt: StateReader {
fn get_account(&self, address: AccountAddress) -> Result<Option<ObjectEntity<Account>>> {
Expand Down

0 comments on commit 9b8f286

Please sign in to comment.