Skip to content

Commit 09b0da8

Browse files
committed
Use characters not strings for single character patterns.
1 parent a489f93 commit 09b0da8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ impl<S: Read + Write> Client<S> {
692692
.map(|&(ref a, _)| *a == "sticker")
693693
.unwrap_or(true)
694694
})
695-
.map(|r| r.map(|(_, b)| b.splitn(2, "=").nth(1).map(|s| s.to_owned()).unwrap()))
695+
.map(|r| r.map(|(_, b)| b.splitn(2, '=').nth(1).map(|s| s.to_owned()).unwrap()))
696696
.collect()
697697
})
698698
}
@@ -708,7 +708,7 @@ impl<S: Read + Write> Client<S> {
708708
rmap.map(|mut map| {
709709
(map.remove("file").unwrap(),
710710
map.remove("sticker")
711-
.and_then(|s| s.splitn(2, "=").nth(1).map(|s| s.to_owned()))
711+
.and_then(|s| s.splitn(2, '=').nth(1).map(|s| s.to_owned()))
712712
.unwrap())
713713
})
714714
})
@@ -741,7 +741,7 @@ impl<S: Read + Write> Proto for Client<S> {
741741
fn read_line(&mut self) -> Result<String> {
742742
let mut buf = String::new();
743743
try!(self.socket.read_line(&mut buf));
744-
if buf.ends_with("\n") {
744+
if buf.ends_with('\n') {
745745
buf.pop();
746746
}
747747
Ok(buf)

0 commit comments

Comments
 (0)