fixup! adjust parse_until_done to return an Option so it is more versatile

This commit is contained in:
Edward Rudd 2022-10-25 15:26:57 -04:00
parent e082d2f4f4
commit 9d9a3cea0d

View file

@ -164,7 +164,9 @@ pub(crate) fn parse_until_done<'input, T, F>(
where where
F: FnMut(Response<'input>) -> Result<MapOrNot<'input, T>>, F: FnMut(Response<'input>) -> Result<MapOrNot<'input, T>>,
{ {
parse_until_done_internal(input, false, unsolicited, map).map(|e| e.unwrap()) parse_until_done_internal(input, false, unsolicited, map).map(|e| {
e.expect("optional = false, so Err(Invalid) would be returned instead of Ok(None)")
})
} }
pub fn parse_expunge( pub fn parse_expunge(