Skip to content

Commit

Permalink
chore: make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiKaiWi committed Dec 7, 2022
1 parent 9fe42b8 commit bea0ff9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/object_store/src/prefix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ impl StoreWithPrefix {
}

fn loc_with_prefix(&self, loc: &Path) -> Path {
let splitted_prefix = self.prefix.as_ref().split(DELIMITER).into_iter();
let splitted_loc = loc.as_ref().split(DELIMITER).into_iter();
if self.prefix.as_ref().is_empty() {
return loc.clone();
}

let splitted_prefix = self.prefix.as_ref().split(DELIMITER);
let splitted_loc = loc.as_ref().split(DELIMITER);
Path::from_iter(splitted_prefix.chain(splitted_loc))
}
}
Expand Down

0 comments on commit bea0ff9

Please sign in to comment.