(items: &mut Option<Vec<T>>, item: T)
| 421 | type ValidationResult<T> = std::result::Result<T, ValidationError>; |
| 422 | |
| 423 | pub fn add_to_config<T>(items: &mut Option<Vec<T>>, item: T) { |
| 424 | if let Some(items) = items { |
| 425 | items.push(item); |
| 426 | } else { |
| 427 | *items = Some(vec![item]); |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | /// Check that the PCI device supplied is neither out of range nor does |
| 432 | /// it use any reserved device ID. |
no test coverage detected