Skip to content

Commit

Permalink
fix: Fix new clippy warnings on Rust 1.82
Browse files Browse the repository at this point in the history
  • Loading branch information
VorpalBlade committed Oct 19, 2024
1 parent 3216738 commit c060611
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 4 additions & 7 deletions crates/konfigkoll_script/src/plugins/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,10 @@ impl KError {

impl Display for KError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
Display::fmt(
&self
.inner
.as_ref()
.unwrap_or(&eyre::eyre!("<ALREADY TAKEN>")),
f,
)
match &self.inner {
Some(inner) => Display::fmt(inner, f),
None => Display::fmt(&eyre::eyre!("<ALREADY TAKEN>"), f),
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion crates/paketkoll_core/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ pub(crate) fn convert_archive_entries(
properties: Properties::Symlink(Symlink {
owner,
group,
target: link.ok_or(eyre::eyre!("Failed to get link target"))?.into(),
target: link
.ok_or_else(|| eyre::eyre!("Failed to get link target"))?
.into(),
}),
flags: FileFlags::empty(),
source,
Expand Down

0 comments on commit c060611

Please sign in to comment.