God damn it

This commit is contained in:
Skye Bleed 2019-09-05 19:05:51 -05:00
parent 7f4fe47710
commit b2c7f9b2fd
2 changed files with 0 additions and 64 deletions

64
log.txt
View file

@ -1,64 +0,0 @@
Compiling pack v0.1.0 (/home/skye/rust/pack)
error[E0308]: mismatched types
--> src/main.rs:26:21
|
26 | err_and_exit("Please enter a repo to download from!", 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected struct `std::string::String`, found reference
| help: try using a conversion method: `"Please enter a repo to download from!".to_string()`
|
= note: expected type `std::string::String`
found type `&'static str`
error[E0308]: match arms have incompatible types
--> src/main.rs:39:14
|
37 | let repo = match vec[1] {
| ________________-
38 | | "arch_core" => "http://mirrors.advancedhosters.com/archlinux/core/os/x86_64/",
| | -------------------------------------------------------------- this is found to be of type `&'static str`
39 | | _ => err_and_exit(format!("Repo {} is not supported...", vec[1]), 0),
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &str, found ()
40 | | };
| |_____- `match` arms have incompatible types
|
= note: expected type `&str`
found type `()`
error[E0308]: match arms have incompatible types
--> src/main.rs:46:19
|
44 | let mut resp = match client.get(url).send() {
| ____________________-
45 | | Ok(a) => a,
| | - this is found to be of type `reqwest::response::Response`
46 | | Err(e) => err_and_exit(format!("ERROR!: Couldn't get package from url. Are you connected to the internet?\n\n{}", e), 0),
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `reqwest::response::Response`, found ()
47 | | };
| |_____- `match` arms have incompatible types
|
= note: expected type `reqwest::response::Response`
found type `()`
error[E0308]: match arms have incompatible types
--> src/main.rs:57:23
|
55 | let mut file = match File::create(format!("/usr/pack/repo/{}/tarballs/{}", vec[1], pkgname)) {
| ________________________-
56 | | Ok(res) => res,
| | --- this is found to be of type `std::fs::File`
57 | | Err(e) => err_and_exit(format!("Failed to create file...did you setup you environment? Do you have permission to create files?\n\n{}", e), 0),
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fs::File`, found ()
58 | | };
| |_________- `match` arms have incompatible types
|
= note: expected type `std::fs::File`
found type `()`
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0308`.
error: Could not compile `pack`.
To learn more, run the command again with --verbose.

BIN
pack

Binary file not shown.