misc/multistream-select: Replace msg.get(0) with msg.first() (#2816)

This commit is contained in:
Max Inden 2022-08-13 12:46:45 +02:00 committed by GitHub
parent a4110a2b69
commit 0a01c81c7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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')
{