Flatten snapshot middleware to be much simpler (#324)

* First take at flattening middleware for simpler code and better perf

* Undo debug prints

* Fix using wrong path in snapshot_from_vfs

* Disable some broken tests

* Re-enable (mistakenly?) disabled CSV test

* Fix some tests

* Update project file tests

* Fix benchmark
This commit is contained in:
Lucien Greathouse
2020-06-17 13:47:09 -07:00
committed by GitHub
parent bdd1afea57
commit 486b067567
18 changed files with 489 additions and 713 deletions

View File

@@ -1,13 +1,5 @@
use std::path::Path;
use memofs::Vfs;
use crate::snapshot::{InstanceContext, InstanceSnapshot};
use crate::snapshot::InstanceSnapshot;
use super::error::SnapshotError;
pub type SnapshotInstanceResult = Result<Option<InstanceSnapshot>, SnapshotError>;
pub trait SnapshotMiddleware {
fn from_vfs(context: &InstanceContext, vfs: &Vfs, path: &Path) -> SnapshotInstanceResult;
}