Clean up anyhow usage

This commit is contained in:
Vicki Pfau 2024-04-04 17:56:48 -07:00
parent 5f2cebc58b
commit a5dfde2b17
3 changed files with 12 additions and 9 deletions

View file

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
use anyhow::{Error, Result};
use anyhow::{anyhow, Result};
use inotify::{Event, EventMask, EventStream, Inotify, WatchDescriptor, WatchMask};
use std::collections::HashMap;
use std::ffi::OsString;
@ -238,7 +238,7 @@ impl Inhibitor {
Some(fname) => PathBuf::from(fname),
None => {
error!("Got an event without an associated filename!");
return Err(Error::msg("Got an event without an associated filename"));
return Err(anyhow!("Got an event without an associated filename"));
}
};
debug!("New device {} found", path.display());