Skip to content

Commit dc66a1b

Browse files
committed
minor: fix clippy
1 parent e74b942 commit dc66a1b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/cmap/conn/wire/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async fn basic() {
4545
MessageSection::Document(doc) => doc,
4646
MessageSection::Sequence { documents, .. } => documents.into_iter().next().unwrap(),
4747
};
48-
let response_doc: Document = bson::from_slice(&response_doc_bytes.as_slice()).unwrap();
48+
let response_doc: Document = bson::from_slice(response_doc_bytes.as_slice()).unwrap();
4949

5050
assert_eq!(response_doc.get("ok"), Some(&Bson::Double(1.0)));
5151
}

src/operation/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub(crate) trait Response: Sized {
142142
/// Whether the command succeeeded or not (i.e. if this response is ok: 1).
143143
fn is_success(&self) -> bool {
144144
match self.ok() {
145-
Some(b) => bson_util::get_int(&b) == Some(1),
145+
Some(b) => bson_util::get_int(b) == Some(1),
146146
None => false,
147147
}
148148
}

src/test/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ fn get_default_uri() -> String {
7373
return uri;
7474
}
7575
}
76-
return "mongodb://localhost:27017".to_string();
76+
"mongodb://localhost:27017".to_string()
7777
}

0 commit comments

Comments
 (0)