fix mtx parser bug: s/strip_suffix/strip_prefix/
This commit is contained in:
parent
64b83c3d70
commit
45212a8c78
@ -58,7 +58,7 @@ fn parse_drive_status(i: &str) -> IResult<&str, DriveStatus> {
|
|||||||
|
|
||||||
let mut loaded_slot = None;
|
let mut loaded_slot = None;
|
||||||
|
|
||||||
if let Some(empty) = i.strip_suffix("Empty") {
|
if let Some(empty) = i.strip_prefix("Empty") {
|
||||||
return Ok((empty, DriveStatus { loaded_slot, status: ElementStatus::Empty }));
|
return Ok((empty, DriveStatus { loaded_slot, status: ElementStatus::Empty }));
|
||||||
}
|
}
|
||||||
let (mut i, _) = tag("Full (")(i)?;
|
let (mut i, _) = tag("Full (")(i)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user