sinf 0.1.0

Library for obtaining in-depth system information at both the hardware and software levels
Documentation
1
2
3
4
5
6
7
8
9
use sinf::Error;

pub fn skip_unsupported<T>(result: Result<T, Error>) -> Option<T> {
    match result {
        Ok(value) => Some(value),
        Err(Error::Unsupported) => None,
        Err(error) => panic!("Expected `Error::Unsupported`, found {error:?}"),
    }
}