Skip to content

Commit 553bf84

Browse files
committed
store: Make VidBatcher::step take a FnOnce instead of FnMut
We didn't really need the FnMut
1 parent 6df8277 commit 553bf84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

store/postgres/src/vid_batcher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ impl VidBatcher {
209209
/// The function returns the time it took to process the batch and the
210210
/// result of `f`. If the batcher is finished, `f` will not be called,
211211
/// and `None` will be returned as its result.
212-
pub fn step<F, T>(&mut self, mut f: F) -> Result<(Duration, Option<T>), StoreError>
212+
pub fn step<F, T>(&mut self, f: F) -> Result<(Duration, Option<T>), StoreError>
213213
where
214-
F: FnMut(i64, i64) -> Result<T, StoreError>,
214+
F: FnOnce(i64, i64) -> Result<T, StoreError>,
215215
{
216216
if self.finished() {
217217
return Ok((Duration::from_secs(0), None));

0 commit comments

Comments
 (0)