fn from_str(s: &str) -> Result<Self, Self::Err> {
        match s.find(':') {
            Some(idx) if idx + 1 < s.len() => Ok(Self {
                start: s[..idx].parse()?,
                end: Some(s[(idx + 1)..].parse()?),
            }),
            _ => Ok(Self {
                start: s.parse()?,
                end: None,
            }),
        }
    }
/// Parses PORT into single range or PORT1:PORTN into full range
Parses PORT into single range or PORT1:PORTN into full range
Parses PORT into single range or PORT1 : PORTN into full range
fn from_str(s: &str) -> Result<Self, Self::Err> {
        match s.find(':') {
            Some(idx) if idx + 1 < s.len() => Ok(Self {
                start: s[..idx].parse()?,
                end: Some(s[(idx + 1)..].parse()?),
            }),
            _ => Ok(Self {
                start: s.parse()?,
                end: None,
            }),
        }
    }
fn from_str ( s : & str ) -> Result < Self , Self :: Err > { match s . find ( ':' ) { Some ( idx ) if idx + 1 < s . len ( ) => Ok ( Self { start : s [ .. idx ] . parse ( ) ? , end : Some ( s [ ( idx + 1 ) .. ] . parse ( ) ? ) , } ) , _ => Ok ( Self { start : s . parse ( ) ? , end : None , } ) , } }
Parses PORT into single range or PORT1:PORTN into full range
Parses PORT into single range or PORT1 : PORTN into full range
s
&str