fn from_str(s: &str) -> Result<ScopeSelector, ParseScopeError> {
        let mut excludes = Vec::new();
        let mut path_str: &str = "";
        for (i, selector) in s.split(" -").enumerate() {
            if i == 0 {
                path_str = selector;
            } else {
                excludes.push(ScopeStack::from_str(selector)?);
            }
        }
        Ok(ScopeSelector {
            path: ScopeStack::from_str(path_str)?,
            excludes,
        })
    }
/// Parses a scope stack followed optionally by (one or more) " -" and then a scope stack to exclude
Parses a scope stack followed optionally by (one or more) " -" and then a scope stack to exclude
Parses a scope stack followed optionally by ( one or more ) " - " and then a scope stack to exclude
fn from_str(s: &str) -> Result<ScopeSelector, ParseScopeError> {
        let mut excludes = Vec::new();
        let mut path_str: &str = "";
        for (i, selector) in s.split(" -").enumerate() {
            if i == 0 {
                path_str = selector;
            } else {
                excludes.push(ScopeStack::from_str(selector)?);
            }
        }
        Ok(ScopeSelector {
            path: ScopeStack::from_str(path_str)?,
            excludes,
        })
    }
fn from_str ( s : & str ) -> Result < ScopeSelector , ParseScopeError > { let mut excludes = Vec :: new ( ) ; let mut path_str : & str = " " ; for ( i , selector ) in s . split ( " " ) . enumerate ( ) { if i == 0 { path_str = selector ; } else { excludes . push ( ScopeStack :: from_str ( selector ) ? ) ; } } Ok ( ScopeSelector { path : ScopeStack :: from_str ( path_str ) ? , excludes , } ) }
Parses a scope stack followed optionally by (one or more) " -" and then a scope stack to exclude
Parses a scope stack followed optionally by ( one or more ) " - " and then a scope stack to exclude
s
&str
s
&str