mirror of
https://github.com/fluencelabs/wasm-module-name
synced 2025-03-14 19:20:49 +00:00
some minor improvements
This commit is contained in:
parent
8f0780439e
commit
50aa00c8df
@ -9,10 +9,10 @@ The utility supports `show` and `set` commands:
|
||||
```bash
|
||||
|
||||
~ $ wasm-module-name show test.wasm
|
||||
The module name <no-name>
|
||||
The module name is <no-name>
|
||||
|
||||
~ $ wasm-module-name set test.wasm test
|
||||
|
||||
~ $ wasm-module-name show test.wasm
|
||||
The module name test
|
||||
The module name is test
|
||||
```
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
//#![warn(missing_docs)]
|
||||
|
||||
// TODO: replace unwrap with more nady error
|
||||
// TODO: replace unwrap with more handy error
|
||||
// TODO: add some docs
|
||||
|
||||
use parity_wasm;
|
||||
use parity_wasm::elements::{NameSection, ModuleNameSubsection, Serialize};
|
||||
use clap::{App, Arg, SubCommand};
|
||||
use clap::{App, AppSettings, Arg, SubCommand};
|
||||
use exitfailure::ExitFailure;
|
||||
use failure::err_msg;
|
||||
|
||||
@ -66,6 +66,7 @@ fn main() -> Result<(), ExitFailure> {
|
||||
.version(VERSION)
|
||||
.author(AUTHORS)
|
||||
.about(DESCRIPTION)
|
||||
.setting(AppSettings::ArgRequiredElseHelp)
|
||||
.subcommand(show_module_name_subcommand())
|
||||
.subcommand(set_module_name_subcommand());
|
||||
|
||||
@ -89,7 +90,7 @@ fn main() -> Result<(), ExitFailure> {
|
||||
None => no_module_name,
|
||||
};
|
||||
|
||||
println!("The module name {}", module_name);
|
||||
println!("The module name is {}", module_name);
|
||||
Ok(())
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user