File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ impl FileFilter {
6161 for line in read_buf.split('\n') {
6262 if line.trim_start().starts_with("path") {
6363 assert!(line.find('=').unwrap() > 0);
64- let submodule = String::from("./") + line.split('=').last().unwrap().trim();
64+ let submodule =
65+ String::from("./") + line.split('=').next_back().unwrap().trim();
6566 log::debug!("Found submodule: {submodule}");
6667 let mut is_ignored = true;
6768 for pat in &self.not_ignored {
@@ -159,7 +160,7 @@ impl FileFilter {
159160 let mut is_hidden = false;
160161 let parent = path
161162 .components()
162- .last ()
163+ .next_back ()
163164 .ok_or(anyhow!("parent directory not known for {path:?}"))?;
164165 if parent.as_os_str().to_str().unwrap().starts_with('.') {
165166 is_hidden = true;
You can’t perform that action at this time.
0 commit comments