File tree Expand file tree Collapse file tree 1 file changed +21
-7
lines changed
hello-borrowing/bin-hello Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Original file line number Diff line number Diff line change 13
13
- install [ cargo script] ( https://crates.io/crates/cargo-script )
14
14
``` bash
15
15
cargo install cargo-script
16
+ cargo install bat
16
17
```
17
18
18
19
## Project
@@ -34,17 +35,30 @@ cargo install borrowing_exerci
34
35
bw -h
35
36
```
36
37
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
39
39
``` 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
41
59
# tip: `f`, Forward one window
42
60
# tip: `b`, Backward one window
43
61
# 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
48
62
```
49
63
50
64
### Resources
You can’t perform that action at this time.
0 commit comments