(
&mut self,
txn: &T,
hash: &Hash,
missing: &'static str,
metrics: &mut SpanContextBuildMetrics,
)
| 678 | |
| 679 | impl SpanBuildLookups { |
| 680 | fn internal<T: SpanPatchReadTxn>( |
| 681 | &mut self, |
| 682 | txn: &T, |
| 683 | hash: &Hash, |
| 684 | missing: &'static str, |
| 685 | metrics: &mut SpanContextBuildMetrics, |
| 686 | ) -> Result<NodeId> { |
| 687 | if let Some(id) = self.internal.get(hash) { |
| 688 | metrics.internal_hits += 1; |
| 689 | return Ok(*id); |
| 690 | } |
| 691 | metrics.internal_lookups += 1; |
| 692 | let id = txn.get_internal(hash)?.context(missing)?; |
| 693 | self.internal.insert(*hash, id); |
| 694 | Ok(id) |
| 695 | } |
| 696 | |
| 697 | fn file<T: SpanPatchReadTxn>( |
| 698 | &mut self, |
no test coverage detected