(&self, key: &(Metric, String), known_other: bool)
| 110 | } |
| 111 | |
| 112 | fn value(&self, key: &(Metric, String), known_other: bool) -> Measurement { |
| 113 | if let Some(entry) = self.entries.get(key) { |
| 114 | return entry.value.clone(); |
| 115 | } |
| 116 | match &self.state { |
| 117 | State::Absent => not_applicable("File is absent in this revision"), |
| 118 | State::Unavailable(reason) => unavailable(reason), |
| 119 | State::Ready if known_other => { |
| 120 | not_applicable("Subject is not present in this revision") |
| 121 | } |
| 122 | State::Ready => not_applicable("No applicable declarations in this file"), |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | fn measured(value: u32) -> Measurement { |
no test coverage detected