We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b875bbd commit 925caa9Copy full SHA for 925caa9
src/multistream_select/protocol.rs
@@ -220,7 +220,7 @@ impl Message {
220
221
// Skip ahead to the next protocol.
222
remaining = &tail[len..];
223
- if remaining.len() == 0 {
+ if remaining.is_empty(){
224
// During negotiation the remote may not append a trailing newline.
225
break;
226
}
@@ -547,11 +547,11 @@ mod tests {
547
#[test]
548
fn test_decode_multiple_protocols_no_trailing_newline() {
549
let raw: [u8; 38] = [
550
- 19, 47, 109, 117, 108, 116, 105, 115, 116, 114, 101, 97, 109, 47, 49, 46, 48, 46, 48, 10,
551
- 17, 47, 105, 112, 102, 115, 47, 112, 105, 110, 103, 47, 49, 46, 48, 46, 48, 10,
+ 19, 47, 109, 117, 108, 116, 105, 115, 116, 114, 101, 97, 109, 47, 49, 46, 48, 46, 48,
+ 10, 17, 47, 105, 112, 102, 115, 47, 112, 105, 110, 103, 47, 49, 46, 48, 46, 48, 10,
552
];
553
let bytes = Bytes::copy_from_slice(&raw);
554
-
+
555
assert_eq!(
556
Message::decode(bytes).unwrap(),
557
Message::Protocols(vec![
src/transport/webrtc/opening.rs
@@ -183,7 +183,7 @@ impl OpeningWebRtcConnection {
183
184
/// Get local fingerprint as bytes.
185
fn local_fingerprint(&mut self) -> Vec<u8> {
186
- Self::fingerprint_to_bytes(&self.rtc.direct_api().local_dtls_fingerprint())
+ Self::fingerprint_to_bytes(self.rtc.direct_api().local_dtls_fingerprint())
187
188
189
/// Convert `Fingerprint` to bytes.
0 commit comments