diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs index 3201d6ad..6157f8bc 100644 --- a/proxmox-time/src/posix.rs +++ b/proxmox-time/src/posix.rs @@ -137,6 +137,10 @@ pub fn strftime(format: &str, t: &libc::tm) -> Result { // -1,, it's unsigned bail!("strftime failed"); } + + // `res` is a `libc::size_t`, which on a different target architecture might not be directly + // assignable to a `usize`. Thus, we actually want a cast here. + #[allow(clippy::unnecessary_cast)] let len = res as usize; if len == 0 {