clippy: Fix warnings

This commit is contained in:
Vicki Pfau 2024-08-06 19:15:30 -07:00
parent d7534ced9c
commit 72e633e336
2 changed files with 2 additions and 2 deletions

View file

@ -220,7 +220,7 @@ impl Inhibitor {
} }
info!("Adding {} to watchlist", path.display()); info!("Adding {} to watchlist", path.display());
let watch = self.inotify.watches().add( let watch = self.inotify.watches().add(
&node.hidraw(), node.hidraw(),
WatchMask::DELETE_SELF WatchMask::DELETE_SELF
| WatchMask::OPEN | WatchMask::OPEN
| WatchMask::CLOSE_NOWRITE | WatchMask::CLOSE_NOWRITE

View file

@ -47,7 +47,7 @@ async fn setup_traces(base: &Path) -> Result<()> {
} }
if let Some((_, rest)) = string.split_once(":") { if let Some((_, rest)) = string.split_once(":") {
let mut flags = rest.split_whitespace(); let mut flags = rest.split_whitespace();
if flags.find(|flag| *flag == "split_lock_detect").is_some() { if flags.any(|flag| flag == "split_lock_detect") {
fs::write(base.join("set_ftrace_filter"), "split_lock_warn").await?; fs::write(base.join("set_ftrace_filter"), "split_lock_warn").await?;
fs::write(base.join("current_tracer"), "function").await?; fs::write(base.join("current_tracer"), "function").await?;
break; break;