I'd like to thank my linter for that tip

This commit is contained in:
Sebastian 2020-05-30 20:30:15 +02:00
parent 7fc5be5f03
commit 39d4c602f4
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ impl<'a> Iterator for Decoder<'a> {
}
}
pub fn decode(msg: &Vec<u8>) -> Result<String, u8> {
pub fn decode(msg: &[u8]) -> Result<String, u8> {
let decoder = Decoder::from(msg.iter().copied());
match decoder.collect() {
Ok(v) => Ok(String::from_utf8(v).unwrap()),