Skip to content

Commit

Permalink
Fixes typos. Updates comment on clap
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco authored and tzemanovic committed Aug 17, 2022
1 parent 3874b7b commit dde1e95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions documentation/dev/src/explore/libraries/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ The considered libraries:

Probably the most widely used CLI library in Rust.

With version 2.x, we'd probably want to use it with [Structops](https://github.com/TeXitoi/structopt) for deriving.

But we can probably use 3.0, which is not yet stable, but is pretty close <https://github.com/clap-rs/clap/issues/1037>. This version comes with deriving attributes and also other new ways to build CLI commands.
With version 2.x, we'd probably want to update clap to 3.x: this version comes with deriving attributes and also other new ways to build CLI commands (previously, deriving was only provided by [StructOpt](https://github.com/TeXitoi/structopt), which is now in maintenance mode).
4 changes: 2 additions & 2 deletions documentation/dev/src/explore/libraries/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

The current preference is to use `thiserror` for most code and `eyre` for reporting errors at the CLI level and the client.

To make the code robust, we should avoid using code that may panic for errors that recoverable and handle all possible errors explicitly. Two exceptions to this rule are:
To make the code robust, we should avoid using code that may panic for errors that are recoverable and handle all possible errors explicitly. Two exceptions to this rule are:
- prototyping, where it's fine to use `unwrap`, `expect`, etc.
- in code paths with conditional compilation **only** for development build, where it's preferable to use `expect` in place of `unwrap` to help with debugging

In case of panics, we should provide an error trace that is helpful for trouble-shooting and debugging.

A great post on error handling library/application distinction: <https://nick.groenen.me/posts/rust-error-handling/>.

The considered DBs:
The considered libraries:
- thiserror
- anyhow
- eyre
Expand Down
4 changes: 2 additions & 2 deletions documentation/dev/src/explore/libraries/network.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# network
# Network

## Libp2p : Peer To Peer network

Expand All @@ -13,7 +13,7 @@ encryption for us.

Generates a client/server from protobuf file. This can be used for a rpc server.

# network behaviour
# Network behaviour

## Gossipsub

Expand Down

0 comments on commit dde1e95

Please sign in to comment.