warnings: Print at runtime, crash at test time

This commit is contained in:
Dorota Czaplejewicz
2019-11-19 08:29:57 +00:00
parent cffe07521e
commit 3c0b142c4f
4 changed files with 134 additions and 60 deletions

View File

@ -177,6 +177,11 @@ impl<T> Borrow<Rc<T>> for Pointer<T> {
}
}
pub trait WarningHandler {
/// Handle a warning
fn handle(&mut self, warning: &str);
}
#[cfg(test)]
mod tests {
use super::*;