mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 10:21:53 +00:00
explicitly return optionmodel for maps
This commit is contained in:
committed by
Aiden McClelland
parent
b7c8ee67bd
commit
a0d9392f77
@@ -242,13 +242,12 @@ impl<T: HasModel + Serialize + for<'de> Deserialize<'de>> OptionModel<T> {
|
||||
|
||||
pub fn map<
|
||||
F: FnOnce(T::Model) -> V,
|
||||
U: Serialize + for<'de> Deserialize<'de>,
|
||||
U: Serialize + for<'de> Deserialize<'de> + HasModel,
|
||||
V: ModelFor<U>,
|
||||
W: ModelFor<Option<U>>,
|
||||
>(
|
||||
self,
|
||||
f: F,
|
||||
) -> W {
|
||||
) -> OptionModel<U> {
|
||||
Into::<JsonPointer>::into(f(self.0)).into()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user