Skip to content

Commit

Permalink
Do not use .clone()
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Aug 8, 2021
1 parent a0ca460 commit 515e0ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ fn run() -> Result<ExitCode> {
let path_separator = matches
.value_of("path-separator")
.map_or_else(filesystem::default_path_separator, |s| Some(s.to_owned()));
if let Some(sep) = path_separator.clone() {

if let Some(ref sep) = path_separator {
if sep.len() > 1 {
return Err(anyhow!(
"A path separator must be exactly one byte, but \
Expand Down

0 comments on commit 515e0ee

Please sign in to comment.