@@ -951,7 +951,7 @@ mod tests {
951951 ] )
952952 . unwrap ( ) ;
953953
954- let guest_mem_list = vec ! [ guest_mem, guest_mem_backed_by_file] ;
954+ let guest_mem_list = [ guest_mem, guest_mem_backed_by_file] ;
955955 for guest_mem in guest_mem_list. iter ( ) {
956956 assert ! ( guest_mem. address_in_range( GuestAddress ( 0x200 ) ) ) ;
957957 assert ! ( !guest_mem. address_in_range( GuestAddress ( 0x600 ) ) ) ;
@@ -977,7 +977,7 @@ mod tests {
977977 ] )
978978 . unwrap ( ) ;
979979
980- let guest_mem_list = vec ! [ guest_mem, guest_mem_backed_by_file] ;
980+ let guest_mem_list = [ guest_mem, guest_mem_backed_by_file] ;
981981 for guest_mem in guest_mem_list. iter ( ) {
982982 assert_eq ! (
983983 guest_mem. check_address( GuestAddress ( 0x200 ) ) ,
@@ -1009,7 +1009,7 @@ mod tests {
10091009 ] )
10101010 . unwrap ( ) ;
10111011
1012- let guest_mem_list = vec ! [ guest_mem, guest_mem_backed_by_file] ;
1012+ let guest_mem_list = [ guest_mem, guest_mem_backed_by_file] ;
10131013 for guest_mem in guest_mem_list. iter ( ) {
10141014 assert ! ( guest_mem. to_region_addr( GuestAddress ( 0x600 ) ) . is_none( ) ) ;
10151015 let ( r0, addr0) = guest_mem. to_region_addr ( GuestAddress ( 0x800 ) ) . unwrap ( ) ;
@@ -1037,7 +1037,7 @@ mod tests {
10371037 ] )
10381038 . unwrap ( ) ;
10391039
1040- let guest_mem_list = vec ! [ guest_mem, guest_mem_backed_by_file] ;
1040+ let guest_mem_list = [ guest_mem, guest_mem_backed_by_file] ;
10411041 for guest_mem in guest_mem_list. iter ( ) {
10421042 assert ! ( guest_mem. get_host_address( GuestAddress ( 0x600 ) ) . is_err( ) ) ;
10431043 let ptr0 = guest_mem. get_host_address ( GuestAddress ( 0x800 ) ) . unwrap ( ) ;
@@ -1064,7 +1064,7 @@ mod tests {
10641064 ) ] )
10651065 . unwrap ( ) ;
10661066
1067- let guest_mem_list = vec ! [ guest_mem, guest_mem_backed_by_file] ;
1067+ let guest_mem_list = [ guest_mem, guest_mem_backed_by_file] ;
10681068 for guest_mem in guest_mem_list. iter ( ) {
10691069 let sample_buf = & [ 1 , 2 , 3 , 4 , 5 ] ;
10701070
@@ -1102,7 +1102,7 @@ mod tests {
11021102 ] )
11031103 . unwrap ( ) ;
11041104
1105- let gm_list = vec ! [ gm, gm_backed_by_file] ;
1105+ let gm_list = [ gm, gm_backed_by_file] ;
11061106 for gm in gm_list. iter ( ) {
11071107 let val1: u64 = 0xaa55_aa55_aa55_aa55 ;
11081108 let val2: u64 = 0x55aa_55aa_55aa_55aa ;
@@ -1142,7 +1142,7 @@ mod tests {
11421142 ) ] )
11431143 . unwrap ( ) ;
11441144
1145- let gm_list = vec ! [ gm, gm_backed_by_file] ;
1145+ let gm_list = [ gm, gm_backed_by_file] ;
11461146 for gm in gm_list. iter ( ) {
11471147 let sample_buf = & [ 1 , 2 , 3 , 4 , 5 ] ;
11481148
@@ -1173,7 +1173,7 @@ mod tests {
11731173 ) ] )
11741174 . unwrap ( ) ;
11751175
1176- let gm_list = vec ! [ gm, gm_backed_by_file] ;
1176+ let gm_list = [ gm, gm_backed_by_file] ;
11771177 for gm in gm_list. iter ( ) {
11781178 let addr = GuestAddress ( 0x1010 ) ;
11791179 let mut file = if cfg ! ( unix) {
@@ -1276,7 +1276,7 @@ mod tests {
12761276 ] )
12771277 . unwrap ( ) ;
12781278
1279- let gm_list = vec ! [ gm, gm_backed_by_file] ;
1279+ let gm_list = [ gm, gm_backed_by_file] ;
12801280 for gm in gm_list. iter ( ) {
12811281 let sample_buf = & [ 1 , 2 , 3 , 4 , 5 ] ;
12821282 assert_eq ! ( gm. write( sample_buf, GuestAddress ( 0xffc ) ) . unwrap( ) , 5 ) ;
@@ -1489,7 +1489,7 @@ mod tests {
14891489 Some ( GuestAddress ( 0xfff ) )
14901490 ) ;
14911491 assert_eq ! ( guest_mem. checked_offset( start_addr2, 0xc00 ) , None ) ;
1492- assert_eq ! ( guest_mem. checked_offset( start_addr1, std :: usize :: MAX ) , None ) ;
1492+ assert_eq ! ( guest_mem. checked_offset( start_addr1, usize :: MAX ) , None ) ;
14931493
14941494 assert_eq ! ( guest_mem. checked_offset( start_addr1, 0x400 ) , None ) ;
14951495 assert_eq ! (
@@ -1518,7 +1518,7 @@ mod tests {
15181518 assert ! ( guest_mem. check_range( start_addr2, 0x800 ) ) ;
15191519 assert ! ( !guest_mem. check_range( start_addr2, 0x801 ) ) ;
15201520 assert ! ( !guest_mem. check_range( start_addr2, 0xc00 ) ) ;
1521- assert ! ( !guest_mem. check_range( start_addr1, std :: usize :: MAX ) ) ;
1521+ assert ! ( !guest_mem. check_range( start_addr1, usize :: MAX ) ) ;
15221522 }
15231523
15241524 #[ test]
0 commit comments