Removing error check for invalid regex

This commit is contained in:
Matt McCoy 2016-06-21 23:22:36 -04:00
parent 2aa66be25d
commit eca26018e8

View file

@ -238,10 +238,7 @@ impl<T: Read+Write> Client<T> {
} }
fn parse_response_ok(&mut self, lines: Vec<String>) -> Result<()> { fn parse_response_ok(&mut self, lines: Vec<String>) -> Result<()> {
let ok_regex = match Regex::new(r"^([a-zA-Z0-9]+) ([a-zA-Z0-9]+)(.*)") { let ok_regex = Regex::new(r"^([a-zA-Z0-9]+) ([a-zA-Z0-9]+)(.*)");
Ok(re) => re,
Err(err) => panic!("{}", err),
};
let last_line = lines.last().unwrap(); let last_line = lines.last().unwrap();
for cap in ok_regex.captures_iter(last_line) { for cap in ok_regex.captures_iter(last_line) {