Merge branch 'master' into 'master'

Speedup jid parsing

See merge request !5
This commit is contained in:
lumi 2017-06-29 12:45:29 +00:00
commit 3882a3ba96

View file

@ -76,7 +76,7 @@ impl FromStr for Jid {
fn from_str(s: &str) -> Result<Jid, JidParseError> {
// TODO: very naive, may need to do it differently
let iter = s.chars();
let mut buf = String::new();
let mut buf = String::with_capacity(s.len());
let mut state = ParserState::Node;
let mut node = None;
let mut domain = None;