mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 12:01:38 +00:00
Make InstanceSnapshotContext mutable through whole middleware pipeline
This commit is contained in:
parent
f0cd4333c3
commit
f3dc78b7cd
11 changed files with 42 additions and 39 deletions
|
|
@ -44,12 +44,12 @@ macro_rules! middlewares {
|
|||
imfs: &mut Imfs<F>,
|
||||
entry: &ImfsEntry,
|
||||
) -> SnapshotInstanceResult<'static> {
|
||||
let context = InstanceSnapshotContext::default();
|
||||
let mut context = InstanceSnapshotContext::default();
|
||||
|
||||
$(
|
||||
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_imfs(&mut context, imfs, entry)? {
|
||||
log::trace!("middleware {} success on {}", stringify!($middleware), entry.path().display());
|
||||
return Ok(Some(snapshot));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue