Fixed bug with Message parsing causing suffixes to include colon prefix.
This commit is contained in:
parent
c8dc582fd1
commit
4479c59e79
2 changed files with 2 additions and 2 deletions
|
@ -21,6 +21,6 @@ fn main() {
|
||||||
let server = IrcServer::from_config(config).unwrap();
|
let server = IrcServer::from_config(config).unwrap();
|
||||||
identify(&server).unwrap();
|
identify(&server).unwrap();
|
||||||
for message in server.iter() {
|
for message in server.iter() {
|
||||||
println!("{}", message)
|
println!("{}", message.into_string())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ impl FromStr for Message {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
let suffix = if state.contains(":") {
|
let suffix = if state.contains(":") {
|
||||||
let suffix = state.find(':').map(|i| state[i..state.len()-1]);
|
let suffix = state.find(':').map(|i| state[i+1..state.len()-1]);
|
||||||
state = state.find(':').map_or("", |i| state[..i]);
|
state = state.find(':').map_or("", |i| state[..i]);
|
||||||
suffix
|
suffix
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue