Skip to content

Commit ec97288

Browse files
chore: bump socket2 to 0.5 (#1020)
Co-authored-by: hzlinyiyu <hzlinyiyu@corp.netease.com>
1 parent c27c6b8 commit ec97288

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ serde_with = "1.3.1"
119119
sha-1 = "0.10.0"
120120
sha2 = "0.10.2"
121121
snap = { version = "1.0.5", optional = true }
122-
socket2 = "0.4.0"
122+
socket2 = "0.5.5"
123123
stringprep = "0.1.2"
124124
strsim = "0.10.0"
125125
take_mut = "0.2.2"

src/operation/update.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ impl<'a, T: Serialize> OperationWithDefaults for Update<'a, T> {
196196
.as_ref()
197197
.and_then(|v| v.first())
198198
.and_then(|doc| doc.get("_id"))
199-
.map(Clone::clone);
199+
.cloned();
200200

201201
let matched_count = if upserted_id.is_some() { 0 } else { response.n };
202202

src/sdam/description/topology.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,8 @@ impl TopologyDescription {
220220
}
221221
(TopologyType::Single, ServerType::Standalone) => {}
222222
(TopologyType::Single, _) => {
223-
let specified_read_pref = criteria
224-
.and_then(SelectionCriteria::as_read_pref)
225-
.map(Clone::clone);
223+
let specified_read_pref =
224+
criteria.and_then(SelectionCriteria::as_read_pref).cloned();
226225

227226
let resolved_read_pref = match specified_read_pref {
228227
Some(ReadPreference::Primary) | None => ReadPreference::PrimaryPreferred {

0 commit comments

Comments
 (0)