mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
reorganize package data and write dependencies rpc (#2571)
* wip * finish dependencies * minor fixes
This commit is contained in:
@@ -124,6 +124,12 @@ impl<T: Serialize + DeserializeOwned> Model<T> {
|
||||
self.ser(&orig)?;
|
||||
Ok(res)
|
||||
}
|
||||
pub fn map_mutate(&mut self, f: impl FnOnce(T) -> Result<T, Error>) -> Result<T, Error> {
|
||||
let mut orig = self.de()?;
|
||||
let res = f(orig)?;
|
||||
self.ser(&res)?;
|
||||
Ok(res)
|
||||
}
|
||||
}
|
||||
impl<T> Clone for Model<T> {
|
||||
fn clone(&self) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user