fmt + import optimisation

i18n
michal 2 years ago
parent 52b893a063
commit 9e55999174

@ -45,7 +45,7 @@ path = "src/main.rs"
[profile.release]
incremental = true
debug = true
debug = false
lto = "fat"
codegen-units = 1

@ -11,7 +11,7 @@ pub fn add(pkg: Package, options: Options) {
"{}/.local/share/ame/db.sqlite",
env::var("HOME").unwrap()
)))
.expect("Couldn't connect to database");
.expect("Couldn't connect to database");
if options.verbosity >= 1 {
log(format!("Adding package {} to database", pkg.name));

@ -31,8 +31,8 @@ pub fn init(options: Options) {
)",
[],
)
.unwrap_or_else(|e| {
crash(format!("Couldn't initialise database: {}", e), 3);
1
});
}
.unwrap_or_else(|e| {
crash(format!("Couldn't initialise database: {}", e), 3);
1
});
}

@ -17,7 +17,7 @@ pub fn query(options: Options) -> Vec<Package> {
"{}/.local/share/ame/db.sqlite",
env::var("HOME").unwrap()
)))
.expect("Couldn't connect to database");
.expect("Couldn't connect to database");
if verbosity >= 1 {
log("Querying database for input".to_string());

@ -10,7 +10,7 @@ pub fn remove(pkg: &str, options: Options) {
"{}/.local/share/ame/db.sqlite",
env::var("HOME").unwrap()
)))
.expect("Couldn't connect to database");
.expect("Couldn't connect to database");
let verbosity = options.verbosity;
@ -26,5 +26,5 @@ pub fn remove(pkg: &str, options: Options) {
WHERE name = ?);",
[pkg],
)
.expect("Couldn't delete package from database");
.expect("Couldn't delete package from database");
}

@ -50,4 +50,4 @@ macro_rules! uwu {
uwu
}};
}
}

@ -23,7 +23,7 @@ pub fn crash(a: String, b: i32) {
a
};
println!("\x1b[2;22;31m❌\x1b[0m \x1b[1;91m{}\x1b[0m", a);
println!("\x1b[2;22;31m❌:\x1b[0m \x1b[1;91m{}\x1b[0m", a);
exit(b);
}

@ -199,9 +199,9 @@ fn main() {
.unwrap()
.is_present("repo")
&& !matches
.subcommand_matches("search")
.unwrap()
.is_present("aur")
.subcommand_matches("search")
.unwrap()
.is_present("aur")
{
info(format!("Searching AUR and repos for {}", &packages[0]));
operations::search(&packages[0], options);

@ -39,7 +39,7 @@ pub fn uninstall(mut a: Vec<String>, options: Options) {
env::var("HOME").unwrap(),
b
)))
.unwrap();
.unwrap();
}
}
}

Loading…
Cancel
Save