Skip to content

Commit

Permalink
cargo clippy --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Artturin committed Sep 6, 2024
1 parent e8c3aec commit 4832689
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/flake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl Flake {

let flake_uri = s.as_deref().unwrap_or("/etc/nixos");
let (flake, name): (&str, &str) = match flake_uri.split_once('#') {
None => (&flake_uri, &hostname),
None => (flake_uri, &hostname),
Some(fln) => fln,
};

Expand All @@ -60,13 +60,13 @@ impl Flake {
/// The path part of original flake.
/// Example: for flake /etc/nixos#vm it should be a /etc/nixos.
/// TODO: not implemented yet. Just returns original argument.
pub(crate) fn path(self: &Self) -> String {
pub(crate) fn path(&self) -> String {
self.flake.to_string()
}

/// The attribute of requested system within the flake.
/// TODO: not implemented yet. Just returns current system.
pub(crate) fn system_attribute(self: &Self) -> String {
pub(crate) fn system_attribute(&self) -> String {
format!(
"{}.{}.config.system.build.toplevel.drvPath",
self.configurations_attribute,
Expand Down
5 changes: 1 addition & 4 deletions src/repology.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ pub(crate) fn get_packages(
});
let latest = match olatest_entry {
None => None,
Some (oe) => match &oe.version {
None => None,
Some(v) => Some(v.clone()),
},
Some (oe) => oe.version.clone(),
};

// There can be multiple nix_unstable package entries for a
Expand Down

0 comments on commit 4832689

Please sign in to comment.