From 88b7aafd05f776f288f3f922f730f7f53d223540 Mon Sep 17 00:00:00 2001 From: Jon Magnuson Date: Thu, 28 Oct 2021 22:27:03 -0500 Subject: [PATCH 1/2] deps: update nix to 0.20.2 Enforces use of a version of nix which contains a patch for RUSTSEC-2021-0119. Fixes #58 Signed-off-by: Jon Magnuson --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 5e61d91..cdb9d40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ readme = "README.md" [dependencies] log = "0.4" regex = "1.1" -nix = "0.20.0" +nix = "0.20.2" libc = "0.2" serde = { version = "1.0", features = ["derive"], optional = true } From 01475ad515a0793213833b86140cc6d520af655b Mon Sep 17 00:00:00 2001 From: Jon Magnuson Date: Fri, 29 Oct 2021 09:00:36 -0500 Subject: [PATCH 2/2] clippy: fix needless-borrow in test Fix needless-borrow in test. Signed-off-by: Jon Magnuson --- tests/cpuset.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cpuset.rs b/tests/cpuset.rs index 76e5308..6521b88 100644 --- a/tests/cpuset.rs +++ b/tests/cpuset.rs @@ -51,7 +51,7 @@ fn test_cpuset_set_cpus() { let cpus = fs::read_to_string("/sys/fs/cgroup/cpuset.cpus.effective").unwrap_or_default(); let cpus = cpus.trim(); if !cpus.is_empty() { - let r = cpuset.set_cpus(&cpus); + let r = cpuset.set_cpus(cpus); assert!(r.is_ok()); let set = cpuset.cpuset(); assert_eq!(1, set.cpus.len());