Skip to content

Commit 925caa9

Browse files
timwu20haikoschol
authored andcommitted
fix lint
1 parent b875bbd commit 925caa9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/multistream_select/protocol.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl Message {
220220

221221
// Skip ahead to the next protocol.
222222
remaining = &tail[len..];
223-
if remaining.len() == 0 {
223+
if remaining.is_empty(){
224224
// During negotiation the remote may not append a trailing newline.
225225
break;
226226
}
@@ -547,11 +547,11 @@ mod tests {
547547
#[test]
548548
fn test_decode_multiple_protocols_no_trailing_newline() {
549549
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,
550+
19, 47, 109, 117, 108, 116, 105, 115, 116, 114, 101, 97, 109, 47, 49, 46, 48, 46, 48,
551+
10, 17, 47, 105, 112, 102, 115, 47, 112, 105, 110, 103, 47, 49, 46, 48, 46, 48, 10,
552552
];
553553
let bytes = Bytes::copy_from_slice(&raw);
554-
554+
555555
assert_eq!(
556556
Message::decode(bytes).unwrap(),
557557
Message::Protocols(vec![

src/transport/webrtc/opening.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ impl OpeningWebRtcConnection {
183183

184184
/// Get local fingerprint as bytes.
185185
fn local_fingerprint(&mut self) -> Vec<u8> {
186-
Self::fingerprint_to_bytes(&self.rtc.direct_api().local_dtls_fingerprint())
186+
Self::fingerprint_to_bytes(self.rtc.direct_api().local_dtls_fingerprint())
187187
}
188188

189189
/// Convert `Fingerprint` to bytes.

0 commit comments

Comments
 (0)