From d0d40382722b90c001c568004caf5da00ab5cc30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Tue, 3 Jan 2023 22:40:01 +0100 Subject: [PATCH] Errors - ErrorHandler.report() consumes the error --- src/errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/errors.rs b/src/errors.rs index 8c97804..63683a9 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -73,7 +73,7 @@ impl ErrorHandler { } /// Report an error. - pub fn report(&mut self, error: &SloxError) { + pub fn report(&mut self, error: SloxError) { if self.had_error.is_none() { self.had_error = Some(error.kind); }