Skip to content
Myr

Move current_directory variable definition closer to usage

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sijmen · committed by David Peter · parent a5f6957 · Browse files · 1 file+1 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:src/main.rs+1 added-2 removed
121 unmodified lines
122 Ok(pattern)123}124125fn extract_search_paths(matches: &clap::ArgMatches) -> Result<Vec<PathBuf>> {126 let current_directory = Path::new(".");127126 let parameter_paths = matches127 .values_of_os("path")128 .or_else(|| matches.values_of_os("search-path"));129
12 unmodified lines
142 }143 })144 .collect(),145 None => {146 let current_directory = Path::new(".");147 ensure_current_directory_exists(current_directory)?;148 vec![current_directory.to_path_buf()]149 }150 };
417 unmodified lines