Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
Signed-off-by: Furisto <24721048+Furisto@users.noreply.github.com>
  • Loading branch information
Furisto committed Jul 30, 2022
1 parent e9c2dae commit db88ac6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions crates/youki/src/commands/list.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Contains Functionality of list container command
use std::fmt::Write as _;
use std::fs;
use std::io;
use std::io::Write;
Expand Down Expand Up @@ -40,15 +41,16 @@ pub fn list(_: List, root_path: PathBuf) -> Result<()> {
"".to_owned()
};

content.push_str(&format!(
"{}\t{}\t{}\t{}\t{}\t{}\n",
let _ = writeln!(
content,
"{}\t{}\t{}\t{}\t{}\t{}",
container.id(),
pid,
container.status(),
container.bundle().display(),
created,
user_name.to_string_lossy()
));
);
}

let mut tab_writer = TabWriter::new(io::stdout());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use oci_spec::runtime::{
pub mod v1;
pub mod v2;

#[allow(clippy::too_many_arguments)]
fn create_cpu_spec(
shares: u64,
quota: i64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn get_test<'a>(test_name: &'static str) -> Test<'a> {
log
};
delete_hook_output_file();
if log != "pre-start1 called\npre-start2 called\npost-start1 called\npost-start2 called\npost-stop1 called\npost-stop2 called\n".to_string() {
if log != "pre-start1 called\npre-start2 called\npost-start1 called\npost-start2 called\npost-stop1 called\npost-stop2 called\n" {
return TestResult::Failed(anyhow!(
"error : hooks must be called in the listed order"
));
Expand Down

0 comments on commit db88ac6

Please sign in to comment.