replace matches with if lets
This commit is contained in:
parent
de4a40cbff
commit
e7fed19538
@ -378,16 +378,10 @@ impl Iterator for SendFileIterator {
|
|||||||
fn main() {
|
fn main() {
|
||||||
println!("[patch] starting server");
|
println!("[patch] starting server");
|
||||||
|
|
||||||
match std::fs::read_dir("patchfiles/") {
|
if let Err(_) = std::fs::read_dir("patchfiles/") {
|
||||||
Ok(_) => {},
|
if let Err(_) = std::fs::create_dir("patchfiles/") {
|
||||||
Err(_) => {
|
panic!("Could not create patchfiles directory!");
|
||||||
match std::fs::create_dir("patchfiles/") {
|
}
|
||||||
Ok(_) => {},
|
|
||||||
Err(_) => {
|
|
||||||
panic!("Could not create patchfiles directory!");
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
let (patch_file_tree, patch_file_lookup) = generate_patch_tree("patchfiles/");
|
let (patch_file_tree, patch_file_lookup) = generate_patch_tree("patchfiles/");
|
||||||
println!("[patch] files to patch:");
|
println!("[patch] files to patch:");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user