Skip to content

Commit c8be582

Browse files
committed
Default btc value to 1
1 parent 5c4964e commit c8be582

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

Cargo.lock

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rbtc"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["Luca Lacerda <[email protected]>"]
55
edition = "2018"
66
repository = "https://github.com/lucawen/rbtc"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The documentation, for now, is the help return of tool:
3434
Get value of a btc value to a currency
3535

3636
USAGE:
37-
rbtc [FLAGS] [OPTIONS] <amount>
37+
rbtc [FLAGS] [OPTIONS] [amount]
3838

3939
FLAGS:
4040
-h, --help Prints help information
@@ -47,7 +47,7 @@ OPTIONS:
4747
-t, --to <to> Set the final currency to convert [default: USD]
4848

4949
ARGS:
50-
<amount> Set amount to convert to a currency or from a currency
50+
<amount> Set amount to convert to a currency or from a currency [default: 1]
5151
```
5252

5353

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const API_URL: &'static str = "https://apiv2.bitcoinaverage.com/convert/global";
1616
#[structopt(name = "rbtc", about = "Get value of a btc value to a currency")]
1717
struct Opt {
1818
/// Set amount to convert to a currency or from a currency
19+
#[structopt(default_value = "1")]
1920
amount: f64,
2021
/// Set the initial currency of
2122
#[structopt(short = "f", long = "from", default_value = "BTC")]

0 commit comments

Comments
 (0)