Skip to content

Commit

Permalink
Slight fixup to the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
coolGi69 committed Jun 16, 2024
1 parent 0f61333 commit 4e37bd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,8 @@ impl LinuxPackageReadout {
/// Returns the number of installed packages for systems
/// that utilize `nix` as their package manager.
fn count_nix() -> Option<usize> {
// Return the number of installed packages using sqlite (~10ms)
// as directly calling nix is a bit more expensive (~40ms)
// Return the number of installed packages using nix's database (~10ms)
// as directly calling to nix is a bit more expensive (~40ms)
return 'sqlite: {
let db = "/nix/var/nix/db/db.sqlite";
if !Path::new(db).is_file() {
Expand All @@ -957,7 +957,7 @@ impl LinuxPackageReadout {
);

if let Ok(con) = connection {
// nix path-info --all --sigs | fgrep ultimate | wc -l
// Equivelent to `nix path-info --all --sigs | grep ultimate | wc -l`
let statement = con.prepare("SELECT COUNT(path) FROM ValidPaths WHERE ultimate=1");

if let Ok(mut s) = statement {
Expand Down

0 comments on commit 4e37bd4

Please sign in to comment.