Skip to content

Commit

Permalink
misc/multistream-select: Replace msg.get(0) with msg.first() (#2816)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Aug 13, 2022
1 parent a4110a2 commit 0a01c81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion misc/multistream-select/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ impl Message {

// If it starts with a `/`, ends with a line feed without any
// other line feeds in-between, it must be a protocol name.
if msg.get(0) == Some(&b'/')
if msg.first() == Some(&b'/')
&& msg.last() == Some(&b'\n')
&& !msg[..msg.len() - 1].contains(&b'\n')
{
Expand Down

0 comments on commit 0a01c81

Please sign in to comment.