refactor load_paths
This commit is contained in:
parent
938ba492c4
commit
55c2aa2749
@ -178,11 +178,9 @@ fn main() -> std::io::Result<()> {
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
let load_paths = if let Some(load_paths) = matches.values_of("LOAD_PATH") {
|
||||
load_paths.map(|p| Path::new(p)).collect()
|
||||
} else {
|
||||
Vec::new()
|
||||
};
|
||||
let load_paths = matches
|
||||
.values_of("LOAD_PATH")
|
||||
.map_or_else(Vec::new, |vals| vals.map(Path::new).collect());
|
||||
|
||||
let options = &Options::default()
|
||||
.load_paths(&load_paths)
|
||||
|
Loading…
x
Reference in New Issue
Block a user