-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tx proxy gen - remove overwrite command
- Loading branch information
1 parent
556468b
commit 1869010
Showing
4 changed files
with
10 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 2 additions & 9 deletions
11
framework/meta/src/cmd/contract/generate_proxy/proxy_crate_gen.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
use std::fs::File; | ||
|
||
#[must_use] | ||
pub(crate) fn create_file(proxies_file_name: &str, overwrite: bool) -> File { | ||
pub(crate) fn create_file(proxies_file_name: &str) -> File { | ||
let file = format!("../{proxies_file_name}"); | ||
|
||
if overwrite { | ||
File::create(&file).expect("could not write proxy file") | ||
} else { | ||
match File::options().create_new(true).write(true).open(&file) { | ||
Ok(f) => f, | ||
Err(_) => panic!("{file} file already exists, --overwrite option was not provided"), | ||
} | ||
} | ||
File::create(&file).expect("could not write proxy file") | ||
Check warning on line 7 in framework/meta/src/cmd/contract/generate_proxy/proxy_crate_gen.rs GitHub Actions / clippy[clippy] framework/meta/src/cmd/contract/generate_proxy/proxy_crate_gen.rs#L7
Raw output
Check warning on line 7 in framework/meta/src/cmd/contract/generate_proxy/proxy_crate_gen.rs GitHub Actions / clippy[clippy] framework/meta/src/cmd/contract/generate_proxy/proxy_crate_gen.rs#L7
Raw output
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters