Errors - ErrorHandler.report() consumes the error

This commit is contained in:
Emmanuel BENOîT 2023-01-03 22:40:01 +01:00
parent 260b19030f
commit d0d4038272

View file

@ -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);
}