mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 08:58:01 +00:00
Use create instead of open for export blocks (#356)
This commit is contained in:
committed by
Arkadiy Paronyan
parent
7e6f3291f4
commit
a649fee20a
@@ -360,7 +360,7 @@ fn export_blocks<E>(matches: &clap::ArgMatches, exit: E) -> error::Result<()>
|
||||
let json = matches.is_present("json");
|
||||
|
||||
let mut file: Box<Write> = match matches.value_of("OUTPUT") {
|
||||
Some(filename) => Box::new(File::open(filename)?),
|
||||
Some(filename) => Box::new(File::create(filename)?),
|
||||
None => Box::new(stdout()),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user