mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
Make all file contents be Arc<Vec<u8>> instead of &[u8]
This commit is contained in:
parent
1031600c63
commit
1967f738a8
9 changed files with 27 additions and 25 deletions
|
|
@ -34,7 +34,7 @@ impl SnapshotMiddleware for SnapshotTxt {
|
|||
};
|
||||
|
||||
let contents = entry.contents(vfs)?;
|
||||
let contents_str = str::from_utf8(contents)
|
||||
let contents_str = str::from_utf8(&contents)
|
||||
.map_err(|err| SnapshotError::file_contents_bad_unicode(err, entry.path()))?
|
||||
.to_string();
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ impl SnapshotMiddleware for SnapshotTxt {
|
|||
|
||||
if let Some(meta_entry) = vfs.get(meta_path).with_not_found()? {
|
||||
let meta_contents = meta_entry.contents(vfs)?;
|
||||
let mut metadata = AdjacentMetadata::from_slice(meta_contents);
|
||||
let mut metadata = AdjacentMetadata::from_slice(&meta_contents);
|
||||
metadata.apply_all(&mut snapshot);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue