Skip to content

Commit d58d665

Browse files
committed
wallet: make with_descriptor_mut return a type
1 parent 6bb313e commit d58d665

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/wallet.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ impl<K, D: Descriptor<K>, L2: Layer2Descriptor> WalletDescr<K, D, L2> {
141141
}
142142
}
143143

144-
pub fn with_descriptor_mut<E>(
144+
pub fn with_descriptor_mut<T, E>(
145145
&mut self,
146-
f: impl FnOnce(&mut D) -> Result<(), E>,
147-
) -> Result<(), E> {
148-
f(&mut self.generator)?;
146+
f: impl FnOnce(&mut D) -> Result<T, E>,
147+
) -> Result<T, E> {
148+
let res = f(&mut self.generator)?;
149149
self.mark_dirty();
150-
Ok(())
150+
Ok(res)
151151
}
152152
}
153153

0 commit comments

Comments
 (0)