Skip to content

Commit

Permalink
Solve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuichiueda committed Feb 2, 2025
2 parents 2c8b1cd + f3a7ad9 commit c358b5f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sush"
version = "2025.3.1"
version = "2025.4.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion src/elements/word/path_expansion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ fn expand(pattern: &str) -> Vec<String> {
let div = pattern.split("/");
let last = div.last().unwrap();
let dir = &pattern[0..pattern.len()-last.len()];
directory::glob(dir, pattern.split("/").last().unwrap())
directory::glob(dir, last)
}

8 changes: 4 additions & 4 deletions src/utils/glob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ fn eat_string(pattern: &mut String, ans: &mut Vec<GlobElem>) -> 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
}

0 comments on commit c358b5f

Please sign in to comment.