From 1a1a21b790a4d264461f575f66021ffefe68164c Mon Sep 17 00:00:00 2001 From: Lleyton Gray Date: Mon, 26 Feb 2024 02:11:52 -0800 Subject: [PATCH] fix: apparently rhai functions require &mut self --- andax/src/fns/rpm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/andax/src/fns/rpm.rs b/andax/src/fns/rpm.rs index e17bc6e..a144dc8 100644 --- a/andax/src/fns/rpm.rs +++ b/andax/src/fns/rpm.rs @@ -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)?; } @@ -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 } }