Update 'src/lib.rs'

This commit is contained in:
delta 2022-11-21 15:22:13 -06:00
parent 686955ceca
commit fd0231a558

View file

@ -79,8 +79,8 @@ impl <'a> LuaPattern<'a> {
LuaPattern::from_bytes_try(bytes).expect("bad pattern")
}
pub fn as_str(self) -> &'a str {
&'a String::from_utf8_lossy(self.patt)
pub fn as_str(self) -> String {
String::from_utf8_lossy(self.patt)
}
/// Match a slice of bytes with a pattern