Batch rename: imfs -> vfs

This commit is contained in:
Lucien Greathouse
2019-10-12 13:58:00 -07:00
parent 24c697bea7
commit 1031600c63
40 changed files with 539 additions and 545 deletions

View File

@@ -37,20 +37,20 @@ use self::{
txt::SnapshotTxt,
user_plugins::SnapshotUserPlugins,
};
use crate::imfs::{Imfs, ImfsEntry, ImfsFetcher};
use crate::vfs::{Vfs, VfsEntry, VfsFetcher};
macro_rules! middlewares {
( $($middleware: ident,)* ) => {
/// Generates a snapshot of instances from the given ImfsEntry.
pub fn snapshot_from_imfs<F: ImfsFetcher>(
/// Generates a snapshot of instances from the given VfsEntry.
pub fn snapshot_from_vfs<F: VfsFetcher>(
context: &mut InstanceSnapshotContext,
imfs: &mut Imfs<F>,
entry: &ImfsEntry,
vfs: &mut Vfs<F>,
entry: &VfsEntry,
) -> SnapshotInstanceResult<'static> {
$(
log::trace!("trying middleware {} on {}", stringify!($middleware), entry.path().display());
if let Some(snapshot) = $middleware::from_imfs(context, imfs, entry)? {
if let Some(snapshot) = $middleware::from_vfs(context, vfs, entry)? {
log::trace!("middleware {} success on {}", stringify!($middleware), entry.path().display());
return Ok(Some(snapshot));
}