Refactor code for improved readability and consistency

- Simplified the formatting of path handling in `change_processor.rs` and `fs_snapshot.rs` by consolidating multiple lines into single lines for better clarity.
- Updated test assertions in `two_way_sync.rs` to streamline the code and enhance maintainability.

These changes enhance the overall readability of the codebase, making it easier to manage and understand.
This commit is contained in:
Joe 2026-02-17 06:34:44 -06:00
parent cc2c828757
commit 85787f3452
4 changed files with 17 additions and 21 deletions

View file

@ -538,7 +538,12 @@ mod tests {
let substitutions = vec![("Workspace/Foo".to_string(), "Workspace/Foo~1".to_string())];
snap.fix_ref_paths(&substitutions);
let result = std::str::from_utf8(snap.added_files.get(Path::new("/test/init.meta.json5")).unwrap()).unwrap();
let result = std::str::from_utf8(
snap.added_files
.get(Path::new("/test/init.meta.json5"))
.unwrap(),
)
.unwrap();
assert!(
result.contains(r#""Rojo_Ref_PrimaryPart": "Workspace/Foo~1""#),
@ -564,7 +569,12 @@ mod tests {
let substitutions = vec![("Workspace/Foo".to_string(), "Workspace/Foo~1".to_string())];
snap.fix_ref_paths(&substitutions);
let result = std::str::from_utf8(snap.added_files.get(Path::new("/test/script.luau")).unwrap()).unwrap();
let result = std::str::from_utf8(
snap.added_files
.get(Path::new("/test/script.luau"))
.unwrap(),
)
.unwrap();
assert!(
result.contains("Workspace/Foo"),
"Non-meta file should not be touched. Got: {}",