add todos, adjust some context messages
This commit is contained in:
@@ -15,8 +15,10 @@ pub(crate) struct Pacman {
|
|||||||
pub(crate) packages: HashSet<Package>,
|
pub(crate) packages: HashSet<Package>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO replace with paru
|
||||||
const BINARY: Text = "yay";
|
const BINARY: Text = "yay";
|
||||||
const SECTION: Text = "pacman";
|
const SECTION: Text = "pacman";
|
||||||
|
// TODO replace these with the long version
|
||||||
const SWITCHES_INSTALL: Switches = &["-S"];
|
const SWITCHES_INSTALL: Switches = &["-S"];
|
||||||
const SWITCHES_REMOVE: Switches = &["-Rsn"];
|
const SWITCHES_REMOVE: Switches = &["-Rsn"];
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ impl Backend for Rust {
|
|||||||
fn get_all_installed_packages(&self) -> Result<HashSet<Package>> {
|
fn get_all_installed_packages(&self) -> Result<HashSet<Package>> {
|
||||||
let file = get_crates_file().context("getting path to crates file")?;
|
let file = get_crates_file().context("getting path to crates file")?;
|
||||||
let content = read_to_string(file).context("reading crates file")?;
|
let content = read_to_string(file).context("reading crates file")?;
|
||||||
let json: Value = serde_json::from_str(&content).context("parsing JSON")?;
|
let json: Value =
|
||||||
extract_packages(json).context("extracing packages from JSON")
|
serde_json::from_str(&content).context("parsing JSON from crates file")?;
|
||||||
|
extract_packages(json).context("extracing packages from crates file")
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_explicitly_installed_packages(&self) -> Result<HashSet<Package>> {
|
fn get_explicitly_installed_packages(&self) -> Result<HashSet<Package>> {
|
||||||
|
|||||||
Reference in New Issue
Block a user