(
&mut self,
txn: &T,
hash: &Hash,
missing: &'static str,
metrics: &mut SpanContextBuildMetrics,
)
| 502 | |
| 503 | impl SpanBuildLookups { |
| 504 | fn internal<T: SpanPatchReadTxn>( |
| 505 | &mut self, |
| 506 | txn: &T, |
| 507 | hash: &Hash, |
| 508 | missing: &'static str, |
| 509 | metrics: &mut SpanContextBuildMetrics, |
| 510 | ) -> Result<NodeId> { |
| 511 | if let Some(id) = self.internal.get(hash) { |
| 512 | metrics.internal_hits += 1; |
| 513 | return Ok(*id); |
| 514 | } |
| 515 | metrics.internal_lookups += 1; |
| 516 | let id = txn.get_internal(hash)?.context(missing)?; |
| 517 | self.internal.insert(*hash, id); |
| 518 | Ok(id) |
| 519 | } |
| 520 | |
| 521 | fn file<T: SpanPatchReadTxn>( |
| 522 | &mut self, |
no test coverage detected