Skip to content

Commit

Permalink
feat: add Dispose for Store (#3429)
Browse files Browse the repository at this point in the history
  • Loading branch information
mscofield0 authored Jan 3, 2025
1 parent df38b07 commit 34ecd2d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions reactive_stores/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ use reactive_graph::{
ArcTrigger,
},
traits::{
DefinedAt, IsDisposed, Notify, ReadUntracked, Track, UntrackableGuard,
Write,
DefinedAt, Dispose, IsDisposed, Notify, ReadUntracked, Track,
UntrackableGuard, Write,
},
};
pub use reactive_stores_macro::{Patch, Store};
Expand Down Expand Up @@ -535,6 +535,15 @@ where
}
}

impl<T, S> Dispose for Store<T, S>
where
T: 'static,
{
fn dispose(self) {
self.inner.dispose();
}
}

impl<T, S> ReadUntracked for Store<T, S>
where
T: 'static,
Expand Down

0 comments on commit 34ecd2d

Please sign in to comment.