fix(clippy): fix warning

This commit is contained in:
MedzikUser 2022-07-26 16:48:55 +02:00
parent 9b1557276e
commit cbbaf6ef1d
No known key found for this signature in database
GPG Key ID: A5FAC1E185C112DB
1 changed files with 1 additions and 1 deletions

View File

@ -8,6 +8,6 @@ pub trait OptionOkOrErr<T> {
impl<T> OptionOkOrErr<T> for Option<T> {
fn ok_or_err(self, desc: &str) -> Result<T, io::Error> {
self.ok_or(io::Error::new(io::ErrorKind::Other, desc))
self.ok_or_else(|| io::Error::new(io::ErrorKind::Other, desc))
}
}