Skip to content

Commit

Permalink
fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
csegarragonz committed Dec 20, 2024
1 parent 2daf89d commit 7bf3b08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
uses: actions/checkout@v4
- name: "Install apt deps"
run: sudo apt install -y libfontconfig1-dev
- name: "Fix rust version"
run: rustup default 1.83.0
- name: "Run cargo fmt check"
run: cargo fmt --all -- --check
- name: "Get cargo version"
run: rustc --version
- name: "Run cargo clippy"
run: cargo clippy -- -D warnings

6 changes: 5 additions & 1 deletion src/containerd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ impl Containerd {
);

// Load the journalctl output into a buffer reader
let journalctl = Command::new("sudo")
let mut journalctl = Command::new("sudo")
.args(["journalctl", "-xeu", "containerd", "-o", "json"])
.stdout(Stdio::piped())
.spawn()
.unwrap();
let stdout = journalctl
.stdout
.take()
.ok_or("sc2-exp: failed to open journalctl stdout")
.unwrap();
let reader = BufReader::new(stdout);
Expand Down Expand Up @@ -235,6 +236,9 @@ impl Containerd {
}
}

// Wait on the process to silent clippy warning
journalctl.wait().expect("Failed to wait on journalctl process");

debug!(
"{}(containerd): got a total of {} events",
Env::SYS_NAME,
Expand Down

0 comments on commit 7bf3b08

Please sign in to comment.