diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-11-19 16:38:32 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-11-19 16:38:32 +0800 |
| commit | a5b28a86e82a2caa062df05b0baf94c4e6d7e1e2 (patch) | |
| tree | 093bd2f7c710d2eea8242e9cceccadf02b8ddf30 | |
| parent | 8f5cac50cf258727969668d9bbc853ad05e5d252 (diff) | |
Add mutable mapping accessor methods to Sheet and SheetData
| -rw-r--r-- | crates/vcs_data/src/data/sheet.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/vcs_data/src/data/sheet.rs b/crates/vcs_data/src/data/sheet.rs index 9e3a1d7..020d12f 100644 --- a/crates/vcs_data/src/data/sheet.rs +++ b/crates/vcs_data/src/data/sheet.rs @@ -104,6 +104,11 @@ impl<'a> Sheet<'a> { &self.data.mapping } + /// Get the muttable mapping of this sheet + pub fn mapping_mut(&self) -> &HashMap<SheetPathBuf, SheetMappingMetadata> { + &self.data.mapping + } + /// Get the id_mapping of this sheet data pub fn id_mapping(&self) -> &Option<HashMap<VirtualFileId, SheetPathBuf>> { &self.data.id_mapping @@ -471,6 +476,11 @@ impl SheetData { &self.mapping } + /// Get the muttable mapping of this sheet data + pub fn mapping_mut(&mut self) -> &mut HashMap<SheetPathBuf, SheetMappingMetadata> { + &mut self.mapping + } + /// Get the id_mapping of this sheet data pub fn id_mapping(&self) -> &Option<HashMap<VirtualFileId, SheetPathBuf>> { &self.id_mapping |
