Skip to content

Why is arg of parse_string list of string? #11

Open
@ogata-k

Description

Why is arg of parse_string list of string? Can covert to use string?

// cli/scanner.rs
fn parse_string(subs: &[String]) -> Result<String, ScannerError> {
if subs.is_empty() {
return Ok(String::default());
} else {
if subs.len() != 1 {
return Err(ScannerError::UnknownStringFormat(subs.to_vec()));
} else {
return Ok(subs[0].to_string());
}
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Why is arg of parse_string list of string? · Issue #11 · ogata-k/fakes-gen-cli