File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -246,10 +246,10 @@ impl TryFrom<Binary> for Vector {
246
246
}
247
247
}
248
248
249
- // Convenience impl to allow passing a Vector directly into the doc! macro. From<Vector> is already
249
+ // Convenience impl to allow passing a Vector directly into the doc! macro. From<& Vector> is already
250
250
// implemented by a blanket impl in src/bson.rs.
251
- impl From < & Vector > for Bson {
252
- fn from ( vector : & Vector ) -> Self {
251
+ impl From < Vector > for Bson {
252
+ fn from ( vector : Vector ) -> Self {
253
253
Self :: Binary ( Binary :: from ( vector) )
254
254
}
255
255
}
Original file line number Diff line number Diff line change @@ -170,6 +170,8 @@ fn run_test_file(test_file: TestFile) {
170
170
// From<Vector> for Bson
171
171
let document = doc ! { "vector" : & test_vector } ;
172
172
assert_eq ! ( document, test_document) ;
173
+ let document = doc ! { "vector" : test_vector. clone( ) } ;
174
+ assert_eq ! ( document, test_document) ;
173
175
174
176
// From<Vector> for RawBson
175
177
let raw_document = rawdoc ! { "vector" : & test_vector } ;
You can’t perform that action at this time.
0 commit comments