Renamed skip_slow to skip_slow_package_managers
This commit is contained in:
parent
79f6aa4c57
commit
f0171701fa
@ -73,7 +73,7 @@ pub enum PackageManager {
|
|||||||
|
|
||||||
/// Obtain the amount of installed packages on the system by checking all installed supported package
|
/// Obtain the amount of installed packages on the system by checking all installed supported package
|
||||||
/// managers and adding the amounts
|
/// managers and adding the amounts
|
||||||
pub fn total_packages(package_readout: &PackageReadout, skip_slow: bool) -> usize {
|
pub fn total_packages(package_readout: &PackageReadout, skip_slow_package_managers: bool) -> usize {
|
||||||
match env::consts::OS {
|
match env::consts::OS {
|
||||||
"linux" => {
|
"linux" => {
|
||||||
let macchina_package_count: Vec<(String, usize)> = package_readout
|
let macchina_package_count: Vec<(String, usize)> = package_readout
|
||||||
@ -130,7 +130,7 @@ fn get_macchina_package_count(
|
|||||||
|
|
||||||
/// return the amount of packages installed with a given linux package manager
|
/// return the amount of packages installed with a given linux package manager
|
||||||
/// Return `0` if the package manager is not installed
|
/// Return `0` if the package manager is not installed
|
||||||
fn packages(pkg_manager: &PackageManager, macchina_package_count: &[(String, usize)], skip_slow: bool) -> usize {
|
fn packages(pkg_manager: &PackageManager, macchina_package_count: &[(String, usize)], skip_slow_package_managers: bool) -> usize {
|
||||||
match pkg_manager {
|
match pkg_manager {
|
||||||
// libmacchina has very fast implementations for most package managers, so we use them
|
// libmacchina has very fast implementations for most package managers, so we use them
|
||||||
// where we can, otherwise we fall back to method used by dylans version of pfetch
|
// where we can, otherwise we fall back to method used by dylans version of pfetch
|
||||||
|
|||||||
@ -152,7 +152,7 @@ struct Readouts {
|
|||||||
kernel_readout: KernelReadout,
|
kernel_readout: KernelReadout,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_info(info: &PfetchInfo, readouts: &Readouts, skip_slow: bool) -> Option<String> {
|
fn get_info(info: &PfetchInfo, readouts: &Readouts, skip_slow_package_managers: bool) -> Option<String> {
|
||||||
match info {
|
match info {
|
||||||
PfetchInfo::Ascii => None,
|
PfetchInfo::Ascii => None,
|
||||||
PfetchInfo::Title => {
|
PfetchInfo::Title => {
|
||||||
@ -200,7 +200,7 @@ fn main() {
|
|||||||
dotenvy::from_path(filepath).unwrap();
|
dotenvy::from_path(filepath).unwrap();
|
||||||
}
|
}
|
||||||
// Check if SKIP_SLOW is enabled
|
// Check if SKIP_SLOW is enabled
|
||||||
let skip_slow = dotenvy::var("SKIP_SLOW").map_or(false, |val| val == "true");
|
let skip_slow = dotenvy::var("PF_FAST_PKG_COUNT").is_ok();
|
||||||
|
|
||||||
let enabled_pf_info_base: Vec<PfetchInfo> = match dotenvy::var("PF_INFO") {
|
let enabled_pf_info_base: Vec<PfetchInfo> = match dotenvy::var("PF_INFO") {
|
||||||
Ok(pfetch_infos) => pfetch_infos
|
Ok(pfetch_infos) => pfetch_infos
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user