]> git.proxmox.com Git - proxmox-backup.git/blobdiff - src/backup/chunk_store.rs
clippy: use chars / byte string literals
[proxmox-backup.git] / src / backup / chunk_store.rs
index 39635d7d6d302042875131a12b2a5683c02c37dd..f782169dbcb2ccbc13c654d22e7941c5ac586eb7 100644 (file)
@@ -44,7 +44,7 @@ fn digest_to_prefix(digest: &[u8]) -> PathBuf {
     buf.push(HEX_CHARS[(digest[0] as usize) &0xf]);
     buf.push(HEX_CHARS[(digest[1] as usize) >> 4]);
     buf.push(HEX_CHARS[(digest[1] as usize) & 0xf]);
-    buf.push('/' as u8);
+    buf.push(b'/');
 
     let path = unsafe { String::from_utf8_unchecked(buf)};
 
@@ -226,7 +226,7 @@ impl ChunkStore {
                                 continue;
                             }
 
-                            let bad = bytes.ends_with(".bad".as_bytes());
+                            let bad = bytes.ends_with(b".bad");
                             return Some((Ok(entry), percentage, bad));
                         }
                         Some(Err(err)) => {