Method
name_inner
(
&'a self,
static_f: impl FnOnce(&'static str) -> R,
heap_f: impl FnOnce(&'a HeapTypeExt) -> R,
)
Source from the content-addressed store, hash-verified
| 1159 | } |
| 1160 | |
| 1161 | fn name_inner<'a, R: 'a>( |
| 1162 | &'a self, |
| 1163 | static_f: impl FnOnce(&'static str) -> R, |
| 1164 | heap_f: impl FnOnce(&'a HeapTypeExt) -> R, |
| 1165 | ) -> R { |
| 1166 | if let Some(ref ext) = self.heaptype_ext { |
| 1167 | heap_f(ext) |
| 1168 | } else { |
| 1169 | static_f(self.slots.name) |
| 1170 | } |
| 1171 | } |
| 1172 | |
| 1173 | pub fn slot_name(&self) -> BorrowedValue<'_, str> { |
| 1174 | self.name_inner( |
Tested by
no test coverage detected