@@ -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;
@@ -115,14 +115,14 @@ mod tests {
115115 "org.nixos.specialisation.v1": {}
116116}"# ;
117117
118- let from_json: Generation = serde_json:: from_str ( & json) . unwrap ( ) ;
118+ let from_json: Generation = serde_json:: from_str ( json) . unwrap ( ) ;
119119 let Generation :: V1 ( from_json) = from_json;
120120
121121 let bootspec = BootSpecV1 {
122122 system : String :: from ( "x86_64-linux" ) ,
123123 label : String :: from ( "NixOS 21.11.20210810.dirty (Linux 5.15.30)" ) ,
124124 kernel : PathBuf :: from ( "/nix/store/xxx-linux/bzImage" ) ,
125- kernel_params : vec ! [
125+ kernel_params : [
126126 "amd_iommu=on" ,
127127 "amd_iommu=pt" ,
128128 "iommu=pt" ,
@@ -176,13 +176,13 @@ mod tests {
176176 "org.test": { "key": "hello" }
177177}"# ;
178178
179- let from_json: BootJson = serde_json:: from_str ( & json) . unwrap ( ) ;
179+ let from_json: BootJson = serde_json:: from_str ( json) . unwrap ( ) ;
180180
181181 let bootspec = BootSpecV1 {
182182 system : String :: from ( "x86_64-linux" ) ,
183183 label : String :: from ( "NixOS 21.11.20210810.dirty (Linux 5.15.30)" ) ,
184184 kernel : PathBuf :: from ( "/nix/store/xxx-linux/bzImage" ) ,
185- kernel_params : vec ! [
185+ kernel_params : [
186186 "amd_iommu=on" ,
187187 "amd_iommu=pt" ,
188188 "iommu=pt" ,
@@ -253,13 +253,13 @@ mod tests {
253253 "org.nixos.specialisation.v1": {}
254254}"# ;
255255
256- let from_json: BootJson = serde_json:: from_str ( & json) . unwrap ( ) ;
256+ let from_json: BootJson = serde_json:: from_str ( json) . unwrap ( ) ;
257257
258258 let bootspec = BootSpecV1 {
259259 system : String :: from ( "x86_64-linux" ) ,
260260 label : String :: from ( "NixOS 21.11.20210810.dirty (Linux 5.15.30)" ) ,
261261 kernel : PathBuf :: from ( "/nix/store/xxx-linux/bzImage" ) ,
262- kernel_params : vec ! [
262+ kernel_params : [
263263 "amd_iommu=on" ,
264264 "amd_iommu=pt" ,
265265 "iommu=pt" ,
@@ -317,7 +317,7 @@ mod tests {
317317 "org.test2": { "hi": null },
318318 "org.test": null
319319}"# ;
320- let json_err = serde_json:: from_str :: < BootJson > ( & json) . unwrap_err ( ) ;
320+ let json_err = serde_json:: from_str :: < BootJson > ( json) . unwrap_err ( ) ;
321321 assert ! ( json_err
322322 . to_string( )
323323 . contains( "org.test was null, but null extensions are not allowed" ) ) ;
@@ -348,13 +348,13 @@ mod tests {
348348 "org.nixos.specialisation.v1": {}
349349}"# ;
350350
351- let from_json: BootJson = serde_json:: from_str ( & json) . unwrap ( ) ;
351+ let from_json: BootJson = serde_json:: from_str ( json) . unwrap ( ) ;
352352
353353 let bootspec = BootSpecV1 {
354354 system : String :: from ( "x86_64-linux" ) ,
355355 label : String :: from ( "NixOS 21.11.20210810.dirty (Linux 5.15.30)" ) ,
356356 kernel : PathBuf :: from ( "/nix/store/xxx-linux/bzImage" ) ,
357- kernel_params : vec ! [
357+ kernel_params : [
358358 "amd_iommu=on" ,
359359 "amd_iommu=pt" ,
360360 "iommu=pt" ,
@@ -408,13 +408,13 @@ mod tests {
408408 }
409409}"# ;
410410
411- let from_json: BootJson = serde_json:: from_str ( & json) . unwrap ( ) ;
411+ let from_json: BootJson = serde_json:: from_str ( json) . unwrap ( ) ;
412412
413413 let bootspec = BootSpecV1 {
414414 system : String :: from ( "x86_64-linux" ) ,
415415 label : String :: from ( "NixOS 21.11.20210810.dirty (Linux 5.15.30)" ) ,
416416 kernel : PathBuf :: from ( "/nix/store/xxx-linux/bzImage" ) ,
417- kernel_params : vec ! [
417+ kernel_params : [
418418 "amd_iommu=on" ,
419419 "amd_iommu=pt" ,
420420 "iommu=pt" ,
@@ -469,7 +469,7 @@ mod tests {
469469 "org.nixos.specialisation.v1": null
470470}"# ;
471471
472- let json_err = serde_json:: from_str :: < GenerationV1 > ( & json) . unwrap_err ( ) ;
472+ let json_err = serde_json:: from_str :: < GenerationV1 > ( json) . unwrap_err ( ) ;
473473 assert ! ( json_err. to_string( ) . contains( "expected a map" ) ) ;
474474 }
475475
@@ -531,7 +531,7 @@ mod tests {
531531 "org.nixos.specialisation.v1": {}
532532}"# ;
533533
534- let from_json: BootJson = serde_json:: from_str ( & json) . unwrap ( ) ;
534+ let from_json: BootJson = serde_json:: from_str ( json) . unwrap ( ) ;
535535 let _generation: GenerationV1 = from_json. generation . try_into ( ) . unwrap ( ) ;
536536 }
537537}
0 commit comments