this doesn't need to be String::from_utf8
This commit is contained in:
parent
59aacddea4
commit
f976d410b3
|
@ -76,8 +76,8 @@ pub fn tokenise(mut line: &[u8]) -> Result<Line, Error> {
|
||||||
let tag_value = match tag_key_value {
|
let tag_value = match tag_key_value {
|
||||||
b"" | b"=" => None,
|
b"" | b"=" => None,
|
||||||
_ => Some(
|
_ => Some(
|
||||||
String::from_utf8(tag_key_value.to_vec())
|
std::str::from_utf8(tag_key_value)
|
||||||
.map(|v| tag_decode(&v))
|
.map(tag_decode)
|
||||||
.map_err(|_| Error::TagValueDecode)?,
|
.map_err(|_| Error::TagValueDecode)?,
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue