aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/format/weechat3.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/format/weechat3.rs b/src/format/weechat3.rs
index e7d8360..0904ced 100644
--- a/src/format/weechat3.rs
+++ b/src/format/weechat3.rs
@@ -1,6 +1,6 @@
use std::io::{ self, BufRead, Write };
use std::borrow::ToOwned;
-use std::iter::{ Iterator, AdditiveIterator };
+use std::iter::{ Iterator };
use log::Event;
use format::{ Encode, Decode };
@@ -31,7 +31,7 @@ impl<R> Iterator for Iter<R> where R: BufRead {
out.pop(); out
}
fn mask(s: &str) -> String {
- s.trim_left_matches('(').trim_right_matches(')').to_owned()
+ if s.len() >= 2 { s[1..(s.len() - 1)].to_owned() } else { String::new() }
}
loop {