@@ -78,7 +78,7 @@ mod tests {
7878 // have a valid `org.nixos.specialisation.v1`).
7979 // https://github.com/NixOS/rfcs/blob/02458c2ecc9f915b143b1923213b40be8ac02a96/rfcs/0125-bootspec.md#bootspec-format-v1
8080 let rfc_json = include_str ! ( "../rfc0125_spec.json" ) ;
81- let from_json = serde_json:: from_str :: < Generation > ( & rfc_json) . unwrap ( ) ;
81+ let from_json = serde_json:: from_str :: < Generation > ( rfc_json) . unwrap ( ) ;
8282 assert_eq ! ( from_json. version( ) , 1 ) ;
8383
8484 let Generation :: V1 ( from_json) = from_json;
@@ -131,14 +131,14 @@ mod tests {
131131 "org.nixos.specialisation.v1": {}
132132}"# ;
133133
134- let from_json: Generation = serde_json:: from_str ( & json) . unwrap ( ) ;
134+ let from_json: Generation = serde_json:: from_str ( json) . unwrap ( ) ;
135135 let Generation :: V1 ( from_json) = from_json;
136136
137137 let bootspec = BootSpecV1 {
138138 system : String :: from ( "x86_64-linux" ) ,
139139 label : String :: from ( "NixOS 21.11.20210810.dirty (Linux 5.15.30)" ) ,
140140 kernel : PathBuf :: from ( "/nix/store/xxx-linux/bzImage" ) ,
141- kernel_params : vec ! [
141+ kernel_params : [
142142 "amd_iommu=on" ,
143143 "amd_iommu=pt" ,
144144 "iommu=pt" ,
@@ -192,13 +192,13 @@ mod tests {
192192 "org.test": { "key": "hello" }
193193}"# ;
194194
195- let from_json: BootJson = serde_json:: from_str ( & json) . unwrap ( ) ;
195+ let from_json: BootJson = serde_json:: from_str ( json) . unwrap ( ) ;
196196
197197 let bootspec = BootSpecV1 {
198198 system : String :: from ( "x86_64-linux" ) ,
199199 label : String :: from ( "NixOS 21.11.20210810.dirty (Linux 5.15.30)" ) ,
200200 kernel : PathBuf :: from ( "/nix/store/xxx-linux/bzImage" ) ,
201- kernel_params : vec ! [
201+ kernel_params : [
202202 "amd_iommu=on" ,
203203 "amd_iommu=pt" ,
204204 "iommu=pt" ,
@@ -269,13 +269,13 @@ mod tests {
269269 "org.nixos.specialisation.v1": {}
270270}"# ;
271271
272- let from_json: BootJson = serde_json:: from_str ( & json) . unwrap ( ) ;
272+ let from_json: BootJson = serde_json:: from_str ( json) . unwrap ( ) ;
273273
274274 let bootspec = BootSpecV1 {
275275 system : String :: from ( "x86_64-linux" ) ,
276276 label : String :: from ( "NixOS 21.11.20210810.dirty (Linux 5.15.30)" ) ,
277277 kernel : PathBuf :: from ( "/nix/store/xxx-linux/bzImage" ) ,
278- kernel_params : vec ! [
278+ kernel_params : [
279279 "amd_iommu=on" ,
280280 "amd_iommu=pt" ,
281281 "iommu=pt" ,
@@ -333,7 +333,7 @@ mod tests {
333333 "org.test2": { "hi": null },
334334 "org.test": null
335335}"# ;
336- let json_err = serde_json:: from_str :: < BootJson > ( & json) . unwrap_err ( ) ;
336+ let json_err = serde_json:: from_str :: < BootJson > ( json) . unwrap_err ( ) ;
337337 assert ! ( json_err
338338 . to_string( )
339339 . contains( "org.test was null, but null extensions are not allowed" ) ) ;
@@ -364,13 +364,13 @@ mod tests {
364364 "org.nixos.specialisation.v1": {}
365365}"# ;
366366
367- let from_json: BootJson = serde_json:: from_str ( & json) . unwrap ( ) ;
367+ let from_json: BootJson = serde_json:: from_str ( json) . unwrap ( ) ;
368368
369369 let bootspec = BootSpecV1 {
370370 system : String :: from ( "x86_64-linux" ) ,
371371 label : String :: from ( "NixOS 21.11.20210810.dirty (Linux 5.15.30)" ) ,
372372 kernel : PathBuf :: from ( "/nix/store/xxx-linux/bzImage" ) ,
373- kernel_params : vec ! [
373+ kernel_params : [
374374 "amd_iommu=on" ,
375375 "amd_iommu=pt" ,
376376 "iommu=pt" ,
@@ -424,13 +424,13 @@ mod tests {
424424 }
425425}"# ;
426426
427- let from_json: BootJson = serde_json:: from_str ( & json) . unwrap ( ) ;
427+ let from_json: BootJson = serde_json:: from_str ( json) . unwrap ( ) ;
428428
429429 let bootspec = BootSpecV1 {
430430 system : String :: from ( "x86_64-linux" ) ,
431431 label : String :: from ( "NixOS 21.11.20210810.dirty (Linux 5.15.30)" ) ,
432432 kernel : PathBuf :: from ( "/nix/store/xxx-linux/bzImage" ) ,
433- kernel_params : vec ! [
433+ kernel_params : [
434434 "amd_iommu=on" ,
435435 "amd_iommu=pt" ,
436436 "iommu=pt" ,
@@ -485,7 +485,7 @@ mod tests {
485485 "org.nixos.specialisation.v1": null
486486}"# ;
487487
488- let json_err = serde_json:: from_str :: < GenerationV1 > ( & json) . unwrap_err ( ) ;
488+ let json_err = serde_json:: from_str :: < GenerationV1 > ( json) . unwrap_err ( ) ;
489489 assert ! ( json_err. to_string( ) . contains( "expected a map" ) ) ;
490490 }
491491
@@ -547,7 +547,7 @@ mod tests {
547547 "org.nixos.specialisation.v1": {}
548548}"# ;
549549
550- let from_json: BootJson = serde_json:: from_str ( & json) . unwrap ( ) ;
550+ let from_json: BootJson = serde_json:: from_str ( json) . unwrap ( ) ;
551551 let _generation: GenerationV1 = from_json. generation . try_into ( ) . unwrap ( ) ;
552552 }
553553}
0 commit comments