Skip to content

Commit f541215

Browse files
committed
doc(README): update
1 parent f1ae539 commit f541215

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
A snippet extractor for competitive programmers.
88

9-
You can manage code snippet with test and bench !!
9+
This allows you to manage your code snippets with tests and benchmarks available !!
1010

1111
## Installing
1212

@@ -27,22 +27,20 @@ $ cargo install cargo-snippet --features="binaries"
2727
Create a project for snippet.
2828

2929
```
30-
$ cargo new mysnippet
30+
$ cargo new --lib mysnippet
3131
```
3232

3333
Add dependencies to Cargo.toml.
3434

3535
```toml
3636
[dependencies]
37-
cargo-snippet = "0.5"
37+
cargo-snippet = "0.6"
3838
```
3939

40-
Add this to src/lib.rs.
40+
Note: `cargo-snippet` on dependencies is needed just for register `#[snippet]` attribute to prevent the error from the compiler.
41+
All logics that extract snippet is in the binary package which is installed by `Installing` section.
4142

42-
Note: `cargo-snippet` on dependencies is needed just for register `#[snippet]` attribute to prevent error from the compiler.
43-
All logic that extract snippet is in binary package which is installed by `Installing` section.
44-
45-
Write some snippet codes and tests.
43+
Then write some snippet codes and tests.
4644

4745
```rust
4846
use cargo_snippet::snippet;
@@ -86,7 +84,7 @@ fn documented() {
8684
//! Inner document also works.
8785
}
8886

89-
// If you want it to be hidden, append `doc_hidden` keyword.
87+
// If you want doc comment to be hidden, append `doc_hidden` keyword.
9088
#[snippet(doc_hidden, prefix = "use std::collections::HashMap;")]
9189
/// This is a doc comment for `bar`.
9290
/// Since `doc_hidden` is specified, it won't be present in the snippet.
@@ -105,7 +103,7 @@ fn test_lcm() {
105103
}
106104
```
107105

108-
You can test.
106+
You can test as always:
109107

110108
```
111109
$ cargo test

0 commit comments

Comments
 (0)