From 7bcdc9049a24d3d7b0e7c13da373ffe18c5500e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 2 Jan 2023 14:42:58 +0100 Subject: [PATCH] rustjail: Fix unnecessary_cast warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As we bumped the rust toolchain to 1.66.0, some new warnings have been raised due to unnecessary_cast. Let's fix them all here. For more info about the warnings, please, take a look at: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast Signed-off-by: Fabiano FidĂȘncio --- src/agent/rustjail/src/seccomp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agent/rustjail/src/seccomp.rs b/src/agent/rustjail/src/seccomp.rs index d8edbcd004..4b0c895154 100644 --- a/src/agent/rustjail/src/seccomp.rs +++ b/src/agent/rustjail/src/seccomp.rs @@ -63,7 +63,7 @@ pub fn get_unknown_syscalls(scmp: &LinuxSeccomp) -> Option> { // init_seccomp creates a seccomp filter and loads it for the current process // including all the child processes. pub fn init_seccomp(scmp: &LinuxSeccomp) -> Result<()> { - let def_action = ScmpAction::from_str(scmp.default_action.as_str(), Some(libc::EPERM as i32))?; + let def_action = ScmpAction::from_str(scmp.default_action.as_str(), Some(libc::EPERM))?; // Create a new filter context let mut filter = ScmpFilterContext::new_filter(def_action)?;