--- a/rust/hg-core/src/narrow.rs Mon Jan 09 19:14:14 2023 +0100
+++ b/rust/hg-core/src/narrow.rs Mon Jan 09 19:18:43 2023 +0100
@@ -37,9 +37,11 @@
}
// Treat "narrowspec does not exist" the same as "narrowspec file exists
// and is empty".
- let store_spec = repo.store_vfs().try_read(FILENAME)?.unwrap_or(vec![]);
- let working_copy_spec =
- repo.hg_vfs().try_read(DIRSTATE_FILENAME)?.unwrap_or(vec![]);
+ let store_spec = repo.store_vfs().try_read(FILENAME)?.unwrap_or_default();
+ let working_copy_spec = repo
+ .hg_vfs()
+ .try_read(DIRSTATE_FILENAME)?
+ .unwrap_or_default();
if store_spec != working_copy_spec {
return Err(HgError::abort(
"working copy's narrowspec is stale",