Skip to content

Commit 345a30f

Browse files
committed
Improve readme style
Signed-off-by: Ahmed Abdelraoof <[email protected]>
1 parent 84e387c commit 345a30f

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

Readme.md

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# safe-discriminant
22

3-
`safe-discriminant` offers a minimalistic, `no_std` compatiable, zero cost
4-
trait + procedural macro for extraction of discriminant out of enums.
3+
`safe-discriminant` provides a minimalistic, `no_std` compatible trait and
4+
procedural macro for extracting discriminants from enums at zero cost. It
5+
automatically generates `unsafe { ... }` blocks, ensuring semantic safety so
6+
you don’t have to worry about it.
57

68
## Installation
79

8-
This crate is available on crates.io and can be used by adding the following to
9-
your project's Cargo.toml:
10-
11-
```toml
12-
[dependencies]
13-
safe-discriminant = "0.1.0"
14-
```
15-
Or run this command in your cargo project:
16-
17-
```sh
18-
$ cargo add safe-discriminant
19-
```
10+
This crate is available on [crates.io](crates.io) and can be easily included in
11+
your project by:
12+
* Adding the following line to your Cargo.toml:
13+
```toml
14+
[dependencies]
15+
safe-discriminant = "0.1.0"
16+
```
17+
* Or runing this command in your cargo project:
18+
```sh
19+
$ cargo add safe-discriminant
20+
```
2021

2122
## Usage
2223

@@ -43,7 +44,8 @@ fn main() {
4344

4445
## Similar Projects
4546

46-
* [strum](https://crates.io/crates/strum) offers a collection of macros for
47-
simplifying working with enums. One of those macros is
48-
[`EnumDiscriminants`](https://docs.rs/strum_macros/latest/strum_macros/derive.EnumDiscriminants.html).
49-
`EnumDiscriminants` extracts the name of each variant of the enum into a separate enum.
47+
* [strum](https://crates.io/crates/strum) provides a collection of macros
48+
designed to simplify working with enums. Among these macros is
49+
[`EnumDiscriminants`](https://docs.rs/strum_macros/latest/strum_macros/derive.EnumDiscriminants.html),
50+
which extracts the name of each variant from the enum and organizes them into
51+
a separate enum.

0 commit comments

Comments
 (0)