fn from_str(s: &str) -> Result<Self> {
        let parts: Vec<&str> = s.split(':').collect();
        match parts.len() {
            1 => Ok(parts[0].parse::<u64>()?.into()),
            2 => Ok(Self {
                major: parts[0].parse()?,
                minor: parts[1].parse()?,
            }),
            _ => Err(Error::UnexpectedFormat),
        }
    }
/// this code is based on `man 5 proc` and my stochastic interpretation
this code is based on `man 5 proc` and my stochastic interpretation
this code is based on ` man 5 proc ` and my stochastic interpretation
fn from_str(s: &str) -> Result<Self> {
        let parts: Vec<&str> = s.split(':').collect();
        match parts.len() {
            1 => Ok(parts[0].parse::<u64>()?.into()),
            2 => Ok(Self {
                major: parts[0].parse()?,
                minor: parts[1].parse()?,
            }),
            _ => Err(Error::UnexpectedFormat),
        }
    }
fn from_str ( s : & str ) -> Result < Self > { let parts : Vec < & str > = s . split ( ':' ) . collect ( ) ; match parts . len ( ) { 1 => Ok ( parts [ 0 ] . parse :: < u64 > ( ) ? . into ( ) ) , 2 => Ok ( Self { major : parts [ 0 ] . parse ( ) ? , minor : parts [ 1 ] . parse ( ) ? , } ) , _ => Err ( Error :: UnexpectedFormat ) , } }
this code is based on `man 5 proc` and my stochastic interpretation
this code is based on ` man 5 proc ` and my stochastic interpretation
s
&str
s
&str