Изменил(а) на 'src/main.rs'
This commit is contained in:
parent
cbbbbfb868
commit
0044360b43
|
@ -6,22 +6,19 @@ fn main() {
|
|||
setwp::del();
|
||||
let _ = fs::create_dir_all("/tmp/unwp").expect("Программе не удалось создать временный каталог для её работы.");
|
||||
let mut base_url = "https://source.unsplash.com/random/".to_string();
|
||||
let irl: &mut String = &mut base_url;
|
||||
|
||||
for arg in std::env::args() {
|
||||
if arg == "hd" {
|
||||
let irl: &mut String = &mut base_url;
|
||||
irl.push_str("1280x720");
|
||||
setwp::download(irl);
|
||||
} else if arg == "fhd" {
|
||||
let irl: &mut String = &mut base_url;
|
||||
irl.push_str("1920x1080");
|
||||
setwp::download(irl);
|
||||
} else if arg == "qhd" {
|
||||
let irl: &mut String = &mut base_url;
|
||||
irl.push_str("3840x2160");
|
||||
setwp::download(irl);
|
||||
} else if arg == "uhd" {
|
||||
let irl: &mut String = &mut base_url;
|
||||
irl.push_str("7680x4320");
|
||||
setwp::download(irl);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue