mirror of
https://git.proxmox.com/git/proxmox
synced 2025-04-29 17:03:08 +00:00
clippy fix: casting to the same type is unnecessary
See: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
parent
41b2e49123
commit
5ea70421b3
@ -137,6 +137,10 @@ pub fn strftime(format: &str, t: &libc::tm) -> Result<String, Error> {
|
||||
// -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user