@@ -22,7 +22,7 @@ fn write_dummy_protocol(path: &str) -> io::Result<()> {
22
22
let mut buf_writer = BufWriter :: new ( file) ;
23
23
24
24
// Let's say our binary file starts with a magic number
25
- // to show readers that this is our protocoll
25
+ // to show readers that this is our protocol
26
26
let magic = b"MyProtocol" ;
27
27
buf_writer. write_all ( magic) ?;
28
28
@@ -58,8 +58,8 @@ fn read_protocol(path: &str) -> io::Result<Vec<u32>> {
58
58
let mut endian = [ 0u8 ; 2 ] ;
59
59
buf_reader. read_exact ( & mut endian) ?;
60
60
match & endian {
61
- b"LE" => read_protocoll_payload :: < LE , _ > ( & mut buf_reader) ,
62
- b"BE" => read_protocoll_payload :: < BE , _ > ( & mut buf_reader) ,
61
+ b"LE" => read_protocol_payload :: < LE , _ > ( & mut buf_reader) ,
62
+ b"BE" => read_protocol_payload :: < BE , _ > ( & mut buf_reader) ,
63
63
_ => Err ( io:: Error :: new (
64
64
io:: ErrorKind :: Other ,
65
65
"Failed to parse endianness" ,
@@ -68,7 +68,7 @@ fn read_protocol(path: &str) -> io::Result<Vec<u32>> {
68
68
}
69
69
70
70
// Read as much of the payload as possible
71
- fn read_protocoll_payload < E , R > ( reader : & mut R ) -> io:: Result < Vec < u32 > >
71
+ fn read_protocol_payload < E , R > ( reader : & mut R ) -> io:: Result < Vec < u32 > >
72
72
where
73
73
E : ByteOrder ,
74
74
R : ReadBytesExt ,
0 commit comments