diff --git a/Cargo.toml b/Cargo.toml index 243c2b4e..d316d8ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sush" -version = "2025.3.1" +version = "2025.4.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/utils/glob.rs b/src/utils/glob.rs index 1d7bba68..f17e9142 100644 --- a/src/utils/glob.rs +++ b/src/utils/glob.rs @@ -67,8 +67,8 @@ fn eat_string(pattern: &mut String, ans: &mut Vec) -> bool { } fn consume(remaining: &mut String, cutpos: usize) -> String { - let cut = remaining[0..cutpos].to_string(); - *remaining = remaining.split_off(cutpos); - - cut + let back = remaining.split_off(cutpos); + let front = remaining.clone(); + *remaining = back; + front }