chore(lint): clippy rules redundant_clone (#2554)

This commit is contained in:
Tunglies
2026-04-15 06:54:07 -07:00
committed by GitHub
parent 73e6542eea
commit 49366ee200
57 changed files with 100 additions and 119 deletions
+1 -1
View File
@@ -150,7 +150,7 @@ fn test_base64_encoding_decoding() {
println!("Encoded: {}", &encoded_string);
let decoded_bytes = base64_decode_url_safe_no_pad(encoded_string.clone().as_bytes()).unwrap();
let decoded_bytes = base64_decode_url_safe_no_pad(encoded_string.as_bytes()).unwrap();
let decoded_string = String::from_utf8(decoded_bytes).unwrap();
assert_eq!(decoded_string, original_uuid_timestamp)
+1 -1
View File
@@ -346,7 +346,7 @@ pub fn path_to_bucket_object(s: &str) -> (String, String) {
/// If the prefix does not contain a separator, or resolves to root/current dir, an empty string is returned.
/// The result ensures a trailing slash if not empty.
pub fn base_dir_from_prefix(prefix: &str) -> String {
let mut base_dir = dir(prefix).to_owned();
let mut base_dir = dir(prefix);
if base_dir == "." || base_dir == "./" || base_dir == "/" {
base_dir = "".to_owned();
}