diff --git a/src/protocol.rs b/src/protocol.rs index 7646a69..16d1334 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -63,7 +63,7 @@ impl Protocol { let arguments:Vec<&str> = input.split_whitespace().collect(); if arguments.len() < 1 { self.running = false; - return Err("ERR Nmissing arguments"); + return Err("ERR Missing arguments"); } match arguments[0] { "setsegment" => { @@ -74,9 +74,9 @@ impl Protocol { let index = match arguments[1].parse::() { Ok(value) => { if value < 8 { - return Err("ERR index out of bounds"); - } else { value + } else { + return Err("ERR index out of bounds"); } }, Err(_e) => return Err("ERR index not a number")