@@ -143,19 +143,19 @@ fn recursive_macro() {
143143 } ;
144144
145145 match doc. get ( "a" ) {
146- Some ( & Bson :: String ( ref s) ) => assert_eq ! ( "foo" , s) ,
146+ Some ( Bson :: String ( s) ) => assert_eq ! ( "foo" , s) ,
147147 _ => panic ! ( "String 'foo' was not inserted correctly." ) ,
148148 }
149149
150150 // Inner Doc 1
151151 match doc. get ( "b" ) {
152- Some ( & Bson :: Document ( ref doc) ) => {
152+ Some ( Bson :: Document ( doc) ) => {
153153 // Inner doc 2
154154 match doc. get ( "bar" ) {
155- Some ( & Bson :: Document ( ref inner_doc) ) => {
155+ Some ( Bson :: Document ( inner_doc) ) => {
156156 // Inner array
157157 match inner_doc. get ( "harbor" ) {
158- Some ( & Bson :: Array ( ref arr) ) => {
158+ Some ( Bson :: Array ( arr) ) => {
159159 assert_eq ! ( 2 , arr. len( ) ) ;
160160
161161 // Match array items
@@ -177,7 +177,7 @@ fn recursive_macro() {
177177
178178 // Inner floating point
179179 match inner_doc. get ( "jelly" ) {
180- Some ( & Bson :: Double ( ref fp) ) => assert_eq ! ( 42.0 , * fp) ,
180+ Some ( Bson :: Double ( fp) ) => assert_eq ! ( 42.0 , * fp) ,
181181 _ => panic ! ( "Floating point 42.0 was not inserted correctly." ) ,
182182 }
183183 }
@@ -189,7 +189,7 @@ fn recursive_macro() {
189189
190190 // Single-item array
191191 match doc. get ( "c" ) {
192- Some ( & Bson :: Array ( ref arr) ) => {
192+ Some ( Bson :: Array ( arr) ) => {
193193 assert_eq ! ( 1 , arr. len( ) ) ;
194194
195195 // Integer type
@@ -203,15 +203,15 @@ fn recursive_macro() {
203203
204204 // Document nested in array
205205 match doc. get ( "d" ) {
206- Some ( & Bson :: Array ( ref arr) ) => {
206+ Some ( Bson :: Array ( arr) ) => {
207207 assert_eq ! ( 1 , arr. len( ) ) ;
208208
209209 // Nested document
210210 match arr. get ( 0 ) {
211211 Some ( Bson :: Document ( ref doc) ) => {
212212 // String
213213 match doc. get ( "apple" ) {
214- Some ( & Bson :: String ( ref s) ) => assert_eq ! ( "ripe" , s) ,
214+ Some ( Bson :: String ( s) ) => assert_eq ! ( "ripe" , s) ,
215215 _ => panic ! ( "String 'ripe' was not inserted correctly." ) ,
216216 }
217217 }
@@ -223,10 +223,10 @@ fn recursive_macro() {
223223
224224 // Single-item document
225225 match doc. get ( "e" ) {
226- Some ( & Bson :: Document ( ref bdoc) ) => {
226+ Some ( Bson :: Document ( bdoc) ) => {
227227 // String
228228 match bdoc. get ( "single" ) {
229- Some ( & Bson :: String ( ref s) ) => assert_eq ! ( "test" , s) ,
229+ Some ( Bson :: String ( s) ) => assert_eq ! ( "test" , s) ,
230230 _ => panic ! ( "String 'test' was not inserted correctly." ) ,
231231 }
232232 }
0 commit comments