Skip to content

Commit

Permalink
fix(complete): Adjust dynamic for MSRV
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Nov 4, 2024
1 parent f1ae3c0 commit 7c7742c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions clap_complete/src/engine/complete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,7 @@ fn rsplit_delimiter<'s, 'o>(
let delimiter = delimiter?;
let value = value.ok()?;
let pos = value.rfind(delimiter)?;
let (prefix, value) = value
.split_at_checked(pos + delimiter.len_utf8())
.expect("since delimiter was found, it is within bounds");
let (prefix, value) = value.split_at(pos + delimiter.len_utf8());
Some((Some(prefix), Ok(value)))
}

Expand Down

0 comments on commit 7c7742c

Please sign in to comment.