refactor(parsing): remove old FromStr-based parser implementation

This commit is contained in:
Khaïs COLIN 2025-05-04 18:17:36 +02:00
parent 106c2547b5
commit 6b49d3ca14
9 changed files with 67 additions and 99 deletions

View file

@ -29,16 +29,3 @@ impl std::fmt::Display for MetaCommandParseError {
}
}
}
impl std::str::FromStr for MetaCommand {
type Err = MetaCommandParseError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s.trim() {
".exit" => Ok(MetaCommand::Exit),
cmd => Err(MetaCommandParseError::Unrecognized {
cmd: cmd.to_string(),
}),
}
}
}