Skip to content

Commit 010ec19

Browse files
committed
borrowing_exerci = "0.4.50"
1 parent d4eec5a commit 010ec19

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

hello-borrowing/bin-hello/README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- install [cargo script](https://crates.io/crates/cargo-script)
1414
```bash
1515
cargo install cargo-script
16+
cargo install bat
1617
```
1718

1819
## Project
@@ -34,17 +35,30 @@ cargo install borrowing_exerci
3435
bw -h
3536
```
3637

37-
## Use the crate `borrowing_exerci`
38-
- run a rust file like `kw_fn.rs` (See Help Command) with error codes
38+
## List all commands with features for code
3939
```bash
40-
bw -f kw_fn -m err | bat -l rs
40+
bw -c <code>
41+
42+
# example:
43+
bw -c closure_immut_string
44+
```
45+
46+
## Run the code with a feature
47+
- run a rust file with a feature
48+
```bash
49+
bw -c <code> -f <feature> | bat -l rs
50+
51+
# example "closure_immut_string" with a feature "ok":
52+
bw -c closure_immut_string -f ok | bat -l rs
53+
# tip: `f`, Forward one window
54+
# tip: `b`, Backward one window
55+
# tip: `q`, Exit.
56+
57+
# example "closure_immut_string" with a feature "err_01":
58+
bw -c closure_immut_string -f err_01 | bat -l rs
4159
# tip: `f`, Forward one window
4260
# tip: `b`, Backward one window
4361
# tip: `q`, Exit.
44-
```
45-
- run a rust file ex `kw_fn.rs` without error codes
46-
```bash
47-
bw -f kw_fn -m ok | bat -l rs
4862
```
4963

5064
### Resources

0 commit comments

Comments
 (0)