mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-29 18:51:22 +00:00
misc/multistream-select: Replace msg.get(0) with msg.first() (#2816)
This commit is contained in:
parent
a4110a2b69
commit
0a01c81c7b
@ -179,7 +179,7 @@ impl Message {
|
|||||||
|
|
||||||
// If it starts with a `/`, ends with a line feed without any
|
// If it starts with a `/`, ends with a line feed without any
|
||||||
// other line feeds in-between, it must be a protocol name.
|
// 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.last() == Some(&b'\n')
|
||||||
&& !msg[..msg.len() - 1].contains(&b'\n')
|
&& !msg[..msg.len() - 1].contains(&b'\n')
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user