mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-23 14:15:24 +00:00
Attach context to instances produced by middleware (#273)
This commit is contained in:
committed by
GitHub
parent
f0a602b48b
commit
4b89bb087a
@@ -18,7 +18,7 @@ pub struct SnapshotJsonModel;
|
||||
|
||||
impl SnapshotMiddleware for SnapshotJsonModel {
|
||||
fn from_vfs<F: VfsFetcher>(
|
||||
_context: &InstanceContext,
|
||||
context: &InstanceContext,
|
||||
vfs: &Vfs<F>,
|
||||
entry: &VfsEntry,
|
||||
) -> SnapshotInstanceResult {
|
||||
@@ -54,8 +54,11 @@ impl SnapshotMiddleware for SnapshotJsonModel {
|
||||
|
||||
let mut snapshot = instance.core.into_snapshot(instance_name.to_owned());
|
||||
|
||||
snapshot.metadata.instigating_source = Some(entry.path().to_path_buf().into());
|
||||
snapshot.metadata.relevant_paths = vec![entry.path().to_path_buf()];
|
||||
snapshot.metadata = snapshot
|
||||
.metadata
|
||||
.instigating_source(entry.path())
|
||||
.relevant_paths(vec![entry.path().to_path_buf()])
|
||||
.context(context);
|
||||
|
||||
Ok(Some(snapshot))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user