@@ -8,7 +8,7 @@ use std::str::FromStr;
8
8
use std:: sync:: Arc ;
9
9
10
10
use sqlx:: mysql:: MySql ;
11
- use sqlx:: { Executor , FromRow , Row } ;
11
+ use sqlx:: { Executor , Row } ;
12
12
13
13
use sqlx:: types:: Text ;
14
14
@@ -310,9 +310,13 @@ test_type!(test_rc<Rc<i32>>(MySql, "1" == Rc::new(1i32)));
310
310
311
311
test_type ! ( test_box_str<Box <str >>( MySql , "'John'" == Box :: <str >:: from( "John" ) ) ) ;
312
312
test_type ! ( test_cow_str<Cow <' _, str >>( MySql , "'Phil'" == Cow :: <' static , str >:: from( "Phil" ) ) ) ;
313
+ test_type ! ( test_arc_str<Arc <str >>( MySql , "'John'" == Arc :: <str >:: from( "John" ) ) ) ;
314
+ test_type ! ( test_rc_str<Rc <str >>( MySql , "'Phil'" == Rc :: <str >:: from( "Phil" ) ) ) ;
313
315
314
316
test_prepared_type ! ( test_box_slice<Box <[ u8 ] >>( MySql , "X'01020304'" == Box :: <[ u8 ] >:: from( [ 1 , 2 , 3 , 4 ] ) ) ) ;
315
317
test_prepared_type ! ( test_cow_slice<Cow <' _, [ u8 ] >>( MySql , "X'01020304'" == Cow :: <' static , [ u8 ] >:: from( & [ 1 , 2 , 3 , 4 ] ) ) ) ;
318
+ test_prepared_type ! ( test_arc_slice<Arc <[ u8 ] >>( MySql , "X'01020304'" == Arc :: <[ u8 ] >:: from( [ 1 , 2 , 3 , 4 ] ) ) ) ;
319
+ test_prepared_type ! ( test_rc_slice<Rc <[ u8 ] >>( MySql , "X'01020304'" == Rc :: <[ u8 ] >:: from( [ 1 , 2 , 3 , 4 ] ) ) ) ;
316
320
317
321
#[ sqlx_macros:: test]
318
322
async fn test_bits ( ) -> anyhow:: Result < ( ) > {
@@ -398,29 +402,3 @@ CREATE TEMPORARY TABLE user_login (
398
402
399
403
Ok ( ( ) )
400
404
}
401
-
402
- #[ sqlx_macros:: test]
403
- async fn test_arc_str_slice ( ) -> anyhow:: Result < ( ) > {
404
- let mut conn = new :: < MySql > ( ) . await ?;
405
-
406
- let arc_str: Arc < str > = "Paul" . into ( ) ;
407
- let arc_slice: Arc < [ u8 ] > = [ 5 , 0 ] . into ( ) ;
408
- let rc_str: Rc < str > = "George" . into ( ) ;
409
- let rc_slice: Rc < [ u8 ] > = [ 5 , 0 ] . into ( ) ;
410
-
411
- let row = sqlx:: query ( "SELECT ?, ?, ?, ?" )
412
- . bind ( & arc_str)
413
- . bind ( & arc_slice)
414
- . bind ( & rc_str)
415
- . bind ( & rc_slice)
416
- . fetch_one ( & mut conn)
417
- . await ?;
418
-
419
- let data: ( Arc < str > , Arc < [ u8 ] > , Rc < str > , Rc < [ u8 ] > ) = FromRow :: from_row ( & row) ?;
420
-
421
- assert ! ( data. 0 == arc_str) ;
422
- assert ! ( data. 1 == arc_slice) ;
423
- assert ! ( data. 2 == rc_str) ;
424
- assert ! ( data. 3 == rc_slice) ;
425
- Ok ( ( ) )
426
- }
0 commit comments