Skip to content

Commit 3b79f1d

Browse files
committed
journal: use std::io::Error::other()
This makes the code a bit easier to read. The change is based on a clippy lint added in rust 1.87.0. [1]: https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
1 parent 67e1f09 commit 3b79f1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/journal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ use tide::{Request, Response, Server};
2828
#[cfg(any(test, feature = "demo_mode"))]
2929
mod sd {
3030
use std::collections::btree_map::BTreeMap;
31+
use std::io::Error;
3132
pub(super) use std::io::Result;
32-
use std::io::{Error, ErrorKind};
3333
use std::thread::sleep;
3434
use std::time::{Duration, SystemTime};
3535

@@ -81,7 +81,7 @@ mod sd {
8181
sleep(Duration::from_secs(5));
8282
}
8383

84-
Err(Error::new(ErrorKind::Other, "Simulation ended"))
84+
Err(Error::other("Simulation ended"))
8585
}
8686
}
8787
}

0 commit comments

Comments
 (0)