[pbs-devel] [PATCH proxmox 02/15] clippy fix: casting to the same type is unnecessary
Lukas Wagner
l.wagner at proxmox.com
Tue Aug 8 10:01:40 CEST 2023
See: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
proxmox-time/src/posix.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs
index 3201d6a..27de549 100644
--- a/proxmox-time/src/posix.rs
+++ b/proxmox-time/src/posix.rs
@@ -137,7 +137,7 @@ pub fn strftime(format: &str, t: &libc::tm) -> Result<String, Error> {
// -1,, it's unsigned
bail!("strftime failed");
}
- let len = res as usize;
+ let len = res;
if len == 0 {
bail!("strftime: result len is 0 (string too large)");
--
2.39.2
More information about the pbs-devel
mailing list