mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-05 12:57:42 +00:00
chore(lint): clippy rules redundant_clone (#2554)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user