@@ -644,9 +644,7 @@ fn create_default_spacetime_config_if_missing(
644644 }
645645
646646 if native_aot {
647- config
648- . additional_fields
649- . insert ( "native-aot" . to_string ( ) , json ! ( true ) ) ;
647+ config. additional_fields . insert ( "native-aot" . to_string ( ) , json ! ( true ) ) ;
650648 }
651649
652650 Ok ( Some ( config. save_to_dir ( project_path) ?) )
@@ -1681,16 +1679,16 @@ pub async fn exec(mut config: Config, args: &ArgMatches) -> anyhow::Result<PathB
16811679
16821680 // Validate that --native-aot is only used with C# projects
16831681 if options. native_aot {
1684- if let Some ( lang) = server_lang {
1685- if lang. to_lowercase ( ) != "csharp" && lang. to_lowercase ( ) != "c#" {
1686- anyhow:: bail!( "--native-aot is only supported for C# projects (--lang csharp)" ) ;
1687- }
1682+ if let Some ( lang) = server_lang
1683+ && lang. to_lowercase ( ) != "csharp"
1684+ && lang. to_lowercase ( ) != "c#"
1685+ {
1686+ anyhow:: bail!( "--native-aot is only supported for C# projects (--lang csharp)" ) ;
16881687 }
16891688 // Print warning about Windows-only support
16901689 println ! (
16911690 "{}" ,
1692- "Note: NativeAOT-LLVM is experimental and currently only supported for Windows server modules."
1693- . yellow( )
1691+ "Note: NativeAOT-LLVM is experimental and currently only supported for Windows server modules." . yellow( )
16941692 ) ;
16951693 }
16961694
@@ -1764,10 +1762,7 @@ pub fn init_csharp_project(project_path: &Path) -> anyhow::Result<()> {
17641762fn add_native_aot_packages_to_csproj ( project_path : & Path ) -> anyhow:: Result < ( ) > {
17651763 let csproj_path = project_path. join ( "StdbModule.csproj" ) ;
17661764 if !csproj_path. exists ( ) {
1767- anyhow:: bail!(
1768- "Could not find StdbModule.csproj at {}" ,
1769- csproj_path. display( )
1770- ) ;
1765+ anyhow:: bail!( "Could not find StdbModule.csproj at {}" , csproj_path. display( ) ) ;
17711766 }
17721767
17731768 let content = std:: fs:: read_to_string ( & csproj_path) ?;
0 commit comments