[pve-devel] [PATCH proxmox-perl-rs v2 06/15] pve-rs: tfa: clippy: redundant slicing of the whole range
Lukas Wagner
l.wagner at proxmox.com
Fri Aug 2 14:25:33 CEST 2024
Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
pve-rs/src/tfa.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pve-rs/src/tfa.rs b/pve-rs/src/tfa.rs
index 7ead18c..1054169 100644
--- a/pve-rs/src/tfa.rs
+++ b/pve-rs/src/tfa.rs
@@ -802,7 +802,7 @@ fn usize_from_perl(value: JsonValue) -> Option<usize> {
fn trim_ascii_whitespace_start(data: &[u8]) -> &[u8] {
match data.iter().position(|&c| !c.is_ascii_whitespace()) {
Some(from) => &data[from..],
- None => &data[..],
+ None => data,
}
}
--
2.39.2
More information about the pve-devel
mailing list