File tree 3 files changed +11
-8
lines changed 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ set -o errexit
5
5
. ~ /.cargo/env
6
6
7
7
# Pin clippy to the latest version. This should be updated when new versions of Rust are released.
8
- CLIPPY_VERSION=1.71 .0
8
+ CLIPPY_VERSION=1.75 .0
9
9
10
10
rustup install $CLIPPY_VERSION
11
11
Original file line number Diff line number Diff line change @@ -179,10 +179,13 @@ fn from_impls() {
179
179
180
180
// References
181
181
assert_eq ! ( Bson :: from( & 24i32 ) , Bson :: Int32 ( 24 ) ) ;
182
- assert_eq ! (
183
- Bson :: try_from( & String :: from( "data" ) ) . unwrap( ) ,
184
- Bson :: String ( String :: from( "data" ) )
185
- ) ;
182
+ #[ allow( clippy:: unnecessary_fallible_conversions) ]
183
+ {
184
+ assert_eq ! (
185
+ Bson :: try_from( & String :: from( "data" ) ) . unwrap( ) ,
186
+ Bson :: String ( String :: from( "data" ) )
187
+ ) ;
188
+ }
186
189
assert_eq ! ( Bson :: from( & oid) , Bson :: ObjectId ( oid) ) ;
187
190
assert_eq ! (
188
191
Bson :: from( & doc! { "a" : "b" } ) ,
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ fn recursive_macro() {
159
159
assert_eq ! ( 2 , arr. len( ) ) ;
160
160
161
161
// Match array items
162
- match arr. get ( 0 ) {
162
+ match arr. first ( ) {
163
163
Some ( Bson :: String ( ref s) ) => assert_eq ! ( "seal" , s) ,
164
164
_ => panic ! (
165
165
"String 'seal' was not inserted into inner array correctly."
@@ -193,7 +193,7 @@ fn recursive_macro() {
193
193
assert_eq ! ( 1 , arr. len( ) ) ;
194
194
195
195
// Integer type
196
- match arr. get ( 0 ) {
196
+ match arr. first ( ) {
197
197
Some ( Bson :: Int32 ( ref i) ) => assert_eq ! ( -7 , * i) ,
198
198
_ => panic ! ( "I32 '-7' was not inserted correctly." ) ,
199
199
}
@@ -207,7 +207,7 @@ fn recursive_macro() {
207
207
assert_eq ! ( 1 , arr. len( ) ) ;
208
208
209
209
// Nested document
210
- match arr. get ( 0 ) {
210
+ match arr. first ( ) {
211
211
Some ( Bson :: Document ( ref doc) ) => {
212
212
// String
213
213
match doc. get ( "apple" ) {
You can’t perform that action at this time.
0 commit comments