summaryrefslogtreecommitdiffstats
path: root/src/http/sse.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/sse.rs')
-rw-r--r--src/http/sse.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/http/sse.rs b/src/http/sse.rs
index 03e09ff..36a9d42 100644
--- a/src/http/sse.rs
+++ b/src/http/sse.rs
@@ -13,7 +13,7 @@ const POLL: Duration = Duration::from_millis(200);
/// only way to reach it, and the alias is what carries the
/// feature-conditional visibility.
mod log_tail {
- use super::*;
+ use super::{builds, io, read_from, Duration, Instant, PathBuf, Read, KEEPALIVE, MAX_LIFETIME, POLL};
pub struct LogTail {
path: PathBuf,
@@ -120,13 +120,8 @@ pub use log_tail::LogTail;
#[cfg(not(feature = "test-support"))]
pub(crate) use log_tail::LogTail;
-
-
fn read_from(path: &Path, offset: u64) -> (Vec<u8>, bool) {
- let mut f = match std::fs::File::open(path) {
- Ok(f) => f,
- Err(_) => return (Vec::new(), false),
- };
+ let Ok(mut f) = std::fs::File::open(path) else { return (Vec::new(), false) };
use std::io::Seek;
if f.seek(std::io::SeekFrom::Start(offset)).is_err() {
return (Vec::new(), false);