Skip to content

Commit 9dfcd67

Browse files
attila-linhzlinyiyu-neteaseisabelatkinson
authored
minor: bump dependencies (#1142)
--------- Co-authored-by: hzlinyiyu <[email protected]> Co-authored-by: Isabel Atkinson <[email protected]>
1 parent 63ea2f7 commit 9dfcd67

File tree

5 files changed

+45
-41
lines changed

5 files changed

+45
-41
lines changed

.evergreen/MSRV-Cargo.toml.diff

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
76c76
1+
79c79
22
< derive_more = "0.99.17"
33
---
44
> derive_more = "=0.99.17"
5-
112a113
5+
100c100
6+
< serde_with = "3.8.1"
7+
---
8+
> serde_with = "=3.5.1"
9+
115a116
610
> url = "=2.5.0"
7-
167c168
11+
170c171
812
< time = "0.3.9"
913
---
10-
> time = "=0.3.9"
14+
> time = "=0.3.20"

Cargo.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ async-trait = "0.1.42"
7171
base64 = "0.13.0"
7272
bitflags = "1.1.0"
7373
bson = { git = "https://github.com/mongodb/bson-rust", branch = "main" }
74-
chrono = { version = "0.4.7", default-features = false, features = ["clock", "std"] }
74+
chrono = { version = "0.4.7", default-features = false, features = [
75+
"clock",
76+
"std",
77+
] }
7578
derivative = "2.1.1"
7679
derive_more = "0.99.17"
7780
flate2 = { version = "1.0", optional = true }
@@ -92,15 +95,15 @@ openssl-probe = { version = "0.1.5", optional = true }
9295
percent-encoding = "2.0.0"
9396
rand = { version = "0.8.3", features = ["small_rng"] }
9497
rayon = { version = "1.5.3", optional = true }
95-
rustc_version_runtime = "0.2.1"
98+
rustc_version_runtime = "0.3.0"
9699
rustls-pemfile = { version = "1.0.1", optional = true }
97-
serde_with = "1.3.1"
100+
serde_with = "3.8.1"
98101
sha-1 = "0.10.0"
99102
sha2 = "0.10.2"
100103
snap = { version = "1.0.5", optional = true }
101104
socket2 = "0.5.5"
102105
stringprep = "0.1.2"
103-
strsim = "0.10.0"
106+
strsim = "0.11.1"
104107
take_mut = "0.2.2"
105108
thiserror = "1.0.24"
106109
tokio-openssl = { version = "0.6.3", optional = true }
@@ -176,4 +179,6 @@ rustdoc-args = ["--cfg", "docsrs"]
176179
all-features = true
177180

178181
[lints.rust]
179-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(mongodb_internal_tracking_arc)'] }
182+
unexpected_cfgs = { level = "warn", check-cfg = [
183+
'cfg(mongodb_internal_tracking_arc)',
184+
] }

src/client/options/test.rs

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -259,21 +259,6 @@ async fn run_connection_string_spec_tests() {
259259
run_tests(&["connection-string"], &skipped_files).await;
260260
}
261261

262-
async fn parse_uri(option: &str, suggestion: Option<&str>) {
263-
match ConnectionString::parse(format!("mongodb://host:27017/?{}=test", option))
264-
.map_err(|e| *e.kind)
265-
{
266-
Ok(_) => panic!("expected error for option {}", option),
267-
Err(ErrorKind::InvalidArgument { message, .. }) => {
268-
match suggestion {
269-
Some(s) => assert!(message.contains(s)),
270-
None => assert!(!message.contains("similar")),
271-
};
272-
}
273-
Err(e) => panic!("expected InvalidArgument, but got {:?}", e),
274-
}
275-
}
276-
277262
#[tokio::test]
278263
async fn uuid_representations() {
279264
let mut uuid_repr = parse_uri_with_uuid_representation("csharpLegacy")
@@ -316,21 +301,31 @@ async fn parse_uri_with_uuid_representation(
316301
}
317302
}
318303

319-
#[tokio::test]
320-
async fn parse_unknown_options() {
321-
parse_uri("invalidoption", None).await;
322-
parse_uri("x", None).await;
323-
parse_uri("max", None).await;
324-
parse_uri("tlstimeout", None).await;
325-
parse_uri("waitqueuetimeout", Some("waitqueuetimeoutms")).await;
326-
parse_uri("retry_reads", Some("retryreads")).await;
327-
parse_uri("poolsize", Some("maxpoolsize")).await;
328-
parse_uri(
329-
"tlspermitinvalidcertificates",
330-
Some("tlsallowinvalidcertificates"),
331-
)
332-
.await;
333-
parse_uri("maxstalenessms", Some("maxstalenessseconds")).await;
304+
#[test]
305+
fn parse_unknown_options() {
306+
fn parse_uri(option: &str, suggestion: Option<&str>) {
307+
match ConnectionString::parse(format!("mongodb://host:27017/?{}=test", option))
308+
.map_err(|e| *e.kind)
309+
{
310+
Ok(_) => panic!("expected error for option {}", option),
311+
Err(ErrorKind::InvalidArgument { message, .. }) => {
312+
match suggestion {
313+
Some(s) => assert!(message.contains(s)),
314+
None => assert!(!message.contains("similar")),
315+
};
316+
}
317+
Err(e) => panic!("expected InvalidArgument, but got {:?}", e),
318+
}
319+
}
320+
321+
parse_uri("invalidoption", None);
322+
parse_uri("x", None);
323+
parse_uri("max", None);
324+
parse_uri("tlstimeout", None);
325+
parse_uri("waitqueuetimeout", Some("waitqueuetimeoutms"));
326+
parse_uri("retry_reads", Some("retryreads"));
327+
parse_uri("poolsize", Some("maxpoolsize"));
328+
parse_uri("maxstalenessms", Some("maxstalenessseconds"));
334329
}
335330

336331
#[tokio::test]

src/operation/find.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl OperationWithDefaults for Find {
4646

4747
if options
4848
.batch_size
49-
.map(|batch_size| batch_size > std::i32::MAX as u32)
49+
.map(|batch_size| batch_size > i32::MAX as u32)
5050
== Some(true)
5151
{
5252
return Err(ErrorKind::InvalidArgument {

src/serde_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub(crate) fn serialize_u32_option_as_batch_size<S: Serializer>(
8585
) -> std::result::Result<S::Ok, S::Error> {
8686
match val {
8787
#[allow(clippy::cast_possible_wrap)]
88-
Some(val) if *val <= std::i32::MAX as u32 => (doc! {
88+
Some(val) if *val <= i32::MAX as u32 => (doc! {
8989
"batchSize": (*val as i32)
9090
})
9191
.serialize(serializer),

0 commit comments

Comments
 (0)