Skip to content

Commit 01f0b05

Browse files
author
yngrtc
committed
fix clippy error due to rust v1.73.0
1 parent 982829b commit 01f0b05

File tree

4 files changed

+71
-47
lines changed

4 files changed

+71
-47
lines changed

Cargo.lock

Lines changed: 68 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

constraints/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repository = "https://github.com/webrtc-rs/constraints"
1212
[dependencies]
1313
indexmap = "2"
1414
serde = { version = "1", features = ["derive"], optional = true }
15-
ordered-float = { version = "3", default-features = false }
15+
ordered-float = { version = "4", default-features = false }
1616
thiserror = "1"
1717

1818
[dev-dependencies]

constraints/src/algorithms/select_settings/apply_mandatory.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ where
3838
}
3939
Err(error) => {
4040
for (property, setting_error) in error.setting_errors {
41-
let entry = failed_constraints
42-
.entry(property)
43-
.or_insert_with(Default::default);
41+
let entry = failed_constraints.entry(property).or_default();
4442
entry.failures += 1;
4543
entry.errors.insert(setting_error);
4644
}

dtls/src/fragment_buffer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl FragmentBuffer {
6060

6161
self.cache
6262
.entry(handshake_header.message_sequence)
63-
.or_insert_with(Vec::new);
63+
.or_default();
6464

6565
// end index should be the length of handshake header but if the handshake
6666
// was fragmented, we should keep them all

0 commit comments

Comments
 (0)