fn expect_non_empty<'a, O, F>(
    mut p: impl nom::Parser<&'a str, O, F>,
) -> impl FnMut(&'a str) -> IResult<&'a str, O, F>
where
    F: nom::error::ParseError<&'a str>,
{
    move |i| {
        if i.is_empty() {
            Err(nom::Err::Error(ParseError::from_error_kind(
                i,
                ErrorKind::LengthValue,
            )))
        } else {
            p.parse(i)
        }
    }
}
Returns Error when string is Empty
packages/stylist-core/src/parser.rs