1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-11-29 05:57:07 +02:00

rust: move to Rust 2024

I'd like to use let chains.

Probably this isn't necessary to do for every crate, but I don't feel
like maintaining a mismash.
This commit is contained in:
Andrew Gallant
2025-09-07 15:07:45 -04:00
parent 3f565b58cc
commit a60e62d9ac
14 changed files with 16 additions and 16 deletions

View File

@@ -482,7 +482,7 @@ impl FormatBuilder {
let err_invalid_scheme = HyperlinkFormatError {
kind: HyperlinkFormatErrorKind::InvalidScheme,
};
let Some(Part::Text(ref part)) = self.parts.first() else {
let Some(Part::Text(part)) = self.parts.first() else {
return Err(err_invalid_scheme);
};
let Some(colon) = part.find_byte(b':') else {
@@ -538,7 +538,7 @@ impl Part {
values: &Values,
dest: &mut Vec<u8>,
) {
match self {
match *self {
Part::Text(ref text) => dest.extend_from_slice(text),
Part::Host => dest.extend_from_slice(
env.host.as_ref().map(|s| s.as_bytes()).unwrap_or(b""),