File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -153,9 +153,7 @@ impl OsRebuildArgs {
153153 let toplevel = toplevel_for (
154154 & target_hostname,
155155 installable,
156- final_attr
157- . unwrap_or_else ( || String :: from ( "toplevel" ) )
158- . as_str ( ) ,
156+ final_attr. as_deref ( ) . unwrap_or ( "toplevel" ) ,
159157 ) ;
160158
161159 let message = match variant {
@@ -776,7 +774,7 @@ pub fn toplevel_for<S: AsRef<str>>(
776774 final_attr : & str ,
777775) -> Installable {
778776 let mut res = installable;
779- let hostname = hostname. as_ref ( ) . to_owned ( ) ;
777+ let hostname_str = hostname. as_ref ( ) ;
780778
781779 let toplevel = [ "config" , "system" , "build" , final_attr]
782780 . into_iter ( )
@@ -790,7 +788,7 @@ pub fn toplevel_for<S: AsRef<str>>(
790788 // nixosConfigurations
791789 if attribute. is_empty ( ) {
792790 attribute. push ( String :: from ( "nixosConfigurations" ) ) ;
793- attribute. push ( hostname ) ;
791+ attribute. push ( hostname_str . to_owned ( ) ) ;
794792 }
795793 attribute. extend ( toplevel) ;
796794 } ,
You can’t perform that action at this time.
0 commit comments