remove compiler warnings

i18n
Amy 3 years ago
parent e6fd5550b9
commit f6ced78141
No known key found for this signature in database
GPG Key ID: 6672E6DD65BEA50B

@ -1,6 +1,5 @@
use crate::mods::strs::{err_unrec, succ};
use runas::Command;
use std::fs::File;
pub fn install(noconfirm: bool, as_dep: bool, pkg: &str) { // install a package
let pkgs: Vec<&str> = pkg.split(" ").collect();

@ -62,8 +62,7 @@ pub fn purge(noconfirm: bool, pkgs: Vec<String>) { // purge packages
pub fn purge_from_file(noconfirm: bool, file: &str) { // purge packages from list of packages
let mut pkgs: Vec<String> = Vec::new();
let mut contents = String::new();
contents = std::fs::read_to_string(&file).expect("Couldn't read file");
let contents = std::fs::read_to_string(&file).expect("Couldn't read file");
for line in contents.lines() {
pkgs.push(line.to_string());
}

@ -61,8 +61,7 @@ pub fn uninstall(noconfirm: bool, pkgs: Vec<String>) { // uninstall a package
pub fn uninstall_from_file(noconfirm: bool, file: &str) { // uninstall a package from a list of packages
let mut pkgs: Vec<String> = Vec::new();
let mut contents = String::new();
contents = std::fs::read_to_string(&file).expect("Couldn't read file");
let contents = std::fs::read_to_string(&file).expect("Couldn't read file");
for line in contents.lines() {
pkgs.push(line.to_string());
}

Loading…
Cancel
Save