File tree Expand file tree Collapse file tree 1 file changed +7
-19
lines changed Expand file tree Collapse file tree 1 file changed +7
-19
lines changed Original file line number Diff line number Diff line change 2
2
// Copyright (c) 2023-2024 Rust Nostr Developers
3
3
// Distributed under the MIT software license
4
4
5
- use std:: fs;
6
- use std:: path:: PathBuf ;
7
5
use std:: process:: { Command , Stdio } ;
8
6
9
7
use lib_flutter_rust_bridge_codegen:: codegen;
@@ -20,24 +18,14 @@ fn main() {
20
18
panic ! ( "Warning: flutter not installed." ) ;
21
19
}
22
20
23
- // Parse config
24
- let config = Config :: from_config_file ( "../flutter_rust_bridge.yaml" )
25
- . unwrap ( )
26
- . unwrap ( ) ;
27
-
28
- // Delete previously generated dart code
29
- if let Some ( path) = & config. dart_output {
30
- let dir: PathBuf = PathBuf :: from ( ".." ) . join ( path) ;
31
- if dir. exists ( ) {
32
- println ! ( "Deleting {}" , dir. display( ) ) ;
33
- fs:: remove_dir_all ( & dir) . unwrap ( ) ;
34
- }
35
-
36
- fs:: create_dir_all ( dir) . unwrap ( ) ;
37
- }
38
-
39
21
// Execute code generator with auto-detected config
40
- codegen:: generate ( config, Default :: default ( ) ) . unwrap ( ) ;
22
+ codegen:: generate (
23
+ Config :: from_config_file ( "../flutter_rust_bridge.yaml" )
24
+ . unwrap ( )
25
+ . unwrap ( ) ,
26
+ Default :: default ( ) ,
27
+ )
28
+ . unwrap ( ) ;
41
29
}
42
30
43
31
fn is_dart_installed ( ) -> bool {
You can’t perform that action at this time.
0 commit comments