From 39d4c602f439d84fe7525d71f1bbba6913ef0605 Mon Sep 17 00:00:00 2001 From: LongHairedHacker Date: Sat, 30 May 2020 20:30:15 +0200 Subject: [PATCH] I'd like to thank my linter for that tip --- src/baudot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/baudot.rs b/src/baudot.rs index 39bd523..6549e9d 100644 --- a/src/baudot.rs +++ b/src/baudot.rs @@ -178,7 +178,7 @@ impl<'a> Iterator for Decoder<'a> { } } -pub fn decode(msg: &Vec) -> Result { +pub fn decode(msg: &[u8]) -> Result { let decoder = Decoder::from(msg.iter().copied()); match decoder.collect() { Ok(v) => Ok(String::from_utf8(v).unwrap()),