Skip to content

Commit

Permalink
chore: use ref
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Jul 10, 2024
1 parent ce82385 commit 68a7f98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ impl NixHealth {
///
/// Fallback to using the default health check config if the flake doesn't
/// override it.
pub async fn from_flake(
url: nix_rs::flake::url::FlakeUrl,
) -> Result<Self, nix_rs::command::NixCmdError> {
pub async fn from_flake(url: &FlakeUrl) -> Result<Self, nix_rs::command::NixCmdError> {
nix_eval_attr_json(
&NixCmd::default(),
&url.with_fully_qualified_root_attr("nix-health"),
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async fn run_checks(flake_url: Option<FlakeUrl>) -> anyhow::Result<Vec<Check>> {
let health: NixHealth = match flake_url.as_ref() {
Some(flake_url) => {
println!("{}, using config from flake '{}':", action_msg, flake_url);
NixHealth::from_flake(flake_url.clone()).await
NixHealth::from_flake(flake_url).await
}
None => {
println!("{}:", action_msg);
Expand Down

0 comments on commit 68a7f98

Please sign in to comment.