fix warnings

This commit is contained in:
Scott Lamb 2022-03-11 12:01:35 -08:00
parent 5264e9848e
commit 78cdd82f36
2 changed files with 5 additions and 2 deletions

View File

@ -189,6 +189,7 @@ pub enum RevocationReason {
AlgorithmChange = 2,
}
#[allow(dead_code)] // Some of these fields are currently only used in Debug. That's fine.
#[derive(Debug, Default)]
pub struct Session {
pub user_id: i32,

View File

@ -947,8 +947,10 @@ impl LockedDatabase {
None => bail!("no such stream {}", stream),
Some(s) => s,
};
use odds::vec::VecExt;
s.on_live_segment.retain_mut(|cb| cb(l.clone()));
// TODO: use std's retain_mut after it's available in our minimum supported Rust version.
// <https://github.com/rust-lang/rust/issues/48919>
odds::vec::VecExt::retain_mut(&mut s.on_live_segment, |cb| cb(l.clone()));
Ok(())
}