Also debug the model besides the storage
This commit is contained in:
committed by
Julien Cretin
parent
fbca34b1d1
commit
a3965eac2d
@@ -53,6 +53,7 @@ pub fn fuzz(mut data: &[u8], debug: bool, stats: Option<&mut Stats>) {
|
||||
driver.check().unwrap();
|
||||
}
|
||||
if fuzzer.debug {
|
||||
println!("{:?}", driver.model().content());
|
||||
println!("----------------------------------------------------------------------");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,6 +200,14 @@ impl StoreDriver {
|
||||
}
|
||||
}
|
||||
|
||||
/// Provides read-only access to the model.
|
||||
pub fn model(&self) -> &StoreModel {
|
||||
match self {
|
||||
StoreDriver::On(x) => x.model(),
|
||||
StoreDriver::Off(x) => x.model(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Extracts the power-on version of the driver.
|
||||
pub fn on(self) -> Option<StoreDriverOn> {
|
||||
match self {
|
||||
|
||||
Reference in New Issue
Block a user