I'd like to thank my linter for that tip
This commit is contained in:
parent
7fc5be5f03
commit
39d4c602f4
|
@ -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()),
|
||||
|
|
Loading…
Reference in New Issue