mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 20:21:38 +00:00
Thread Cow<'str> through for naming nodes
This commit is contained in:
parent
f254a51d59
commit
3620a9d256
2 changed files with 37 additions and 35 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use std::{
|
||||
borrow::Cow,
|
||||
collections::HashMap,
|
||||
path::{Path, PathBuf},
|
||||
str,
|
||||
|
|
@ -80,10 +81,12 @@ impl RbxSession {
|
|||
|
||||
trace!("Snapshotting path {}", path_to_snapshot.display());
|
||||
|
||||
let instance_name = self.sync_point_names.get(&path_to_snapshot)
|
||||
.map(|value| Cow::Owned(value.to_owned()));
|
||||
let mut snapshot_meta = SnapshotMetadata {
|
||||
sync_point_names: &mut self.sync_point_names,
|
||||
};
|
||||
let maybe_snapshot = snapshot_imfs_path(&imfs, &mut snapshot_meta, &path_to_snapshot)
|
||||
let maybe_snapshot = snapshot_imfs_path(&imfs, &mut snapshot_meta, &path_to_snapshot, instance_name)
|
||||
.unwrap_or_else(|_| panic!("Could not generate instance snapshot for path {}", path_to_snapshot.display()));
|
||||
|
||||
let snapshot = match maybe_snapshot {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue