Attach context to instances produced by middleware (#273)

This commit is contained in:
Lucien Greathouse 2019-12-04 11:38:28 -08:00 • committed by GitHub
parent f0a602b48b
commit 4b89bb087a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 16 deletions

View file

@ -16,7 +16,7 @@ pub struct SnapshotRbxm;
impl SnapshotMiddleware for SnapshotRbxm {
fn from_vfs<F: VfsFetcher>(
_context: &InstanceContext,
context: &InstanceContext,
vfs: &Vfs<F>,
entry: &VfsEntry,
) -> SnapshotInstanceResult {
@ -48,7 +48,8 @@ impl SnapshotMiddleware for SnapshotRbxm {
.metadata(
InstanceMetadata::new()
.instigating_source(entry.path())
.relevant_paths(vec![entry.path().to_path_buf()]),
.relevant_paths(vec![entry.path().to_path_buf()])
.context(context),
);
Ok(Some(snapshot))