Format fixes (#9)
``` cargo fmt --all -- --check ``` Signed-off-by: Aravinda Vishwanathapura <mail@aravindavk.in>
This commit is contained in:
parent
811f7783ab
commit
49b988cdb0
1 changed files with 3 additions and 5 deletions
|
|
@ -9,7 +9,7 @@ use std::path::Path;
|
||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
pub enum LogWatcherAction{
|
pub enum LogWatcherAction {
|
||||||
None,
|
None,
|
||||||
SeekToEnd,
|
SeekToEnd,
|
||||||
}
|
}
|
||||||
|
|
@ -96,14 +96,12 @@ impl LogWatcher {
|
||||||
if len > 0 {
|
if len > 0 {
|
||||||
self.pos += len as u64;
|
self.pos += len as u64;
|
||||||
self.reader.seek(SeekFrom::Start(self.pos)).unwrap();
|
self.reader.seek(SeekFrom::Start(self.pos)).unwrap();
|
||||||
match callback(line.replace("\n", ""))
|
match callback(line.replace("\n", "")) {
|
||||||
{
|
|
||||||
LogWatcherAction::SeekToEnd => {
|
LogWatcherAction::SeekToEnd => {
|
||||||
println!("SeekToEnd");
|
println!("SeekToEnd");
|
||||||
self.reader.seek(SeekFrom::End(0)).unwrap();
|
self.reader.seek(SeekFrom::End(0)).unwrap();
|
||||||
}
|
}
|
||||||
LogWatcherAction::None => {
|
LogWatcherAction::None => {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
line.clear();
|
line.clear();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue