If the `IsaSpec` contains exactly 1 `TargetIsa` we return a reference to it
(&self)
| 25 | impl IsaSpec { |
| 26 | /// If the `IsaSpec` contains exactly 1 `TargetIsa` we return a reference to it |
| 27 | pub fn unique_isa(&self) -> Option<&dyn TargetIsa> { |
| 28 | if let Self::Some(ref isa_vec) = *self { |
| 29 | if isa_vec.len() == 1 { |
| 30 | return Some(&*isa_vec[0]); |
| 31 | } |
| 32 | } |
| 33 | None |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | /// An error type returned by `parse_options`. |
no test coverage detected