fix parse

This commit is contained in:
Quaternions 2023-09-12 18:48:07 -07:00
parent a7554da1c5
commit 7ab20f36a7

View File

@ -337,9 +337,9 @@ struct ParseScriptActionErr;
impl std::str::FromStr for ScriptActionParseResult { impl std::str::FromStr for ScriptActionParseResult {
type Err=ParseScriptActionErr; type Err=ParseScriptActionErr;
fn from_str(s: &str) -> Result<Self, Self::Err>{ fn from_str(s: &str) -> Result<Self, Self::Err>{
if s=="pass"||s=="1"{ if s=="pass\n"||s=="1\n"{
Ok(Self::Pass) Ok(Self::Pass)
}else if s=="block"{ }else if s=="block\n"{
Ok(Self::Block) Ok(Self::Block)
}else{ }else{
Err(ParseScriptActionErr) Err(ParseScriptActionErr)