Skip to content

Commit

Permalink
fix: apparently rhai functions require &mut self
Browse files Browse the repository at this point in the history
  • Loading branch information
lleyton committed Feb 26, 2024
1 parent 7b8dad1 commit 1a1a21b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions andax/src/fns/rpm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl RPMSpec {
///
/// # Errors
/// - happens only if the writing part failed :3
pub fn write(self) -> std::io::Result<()> {
pub fn write(mut self) -> std::io::Result<()> {
if self.changed() {
fs::write(self.spec, self.f)?;
}
Expand All @@ -106,7 +106,7 @@ impl RPMSpec {
}
/// Check if file has been changed
#[must_use]
pub fn changed(&self) -> bool {
pub fn changed(&mut self) -> bool {
self.f != self.original
}
}
Expand Down

0 comments on commit 1a1a21b

Please sign in to comment.