Skip to content

Commit

Permalink
Merge pull request #8 from alpenlabs/storopoli/docs/modules
Browse files Browse the repository at this point in the history
doc: add module-level docs
  • Loading branch information
storopoli authored Sep 13, 2024
2 parents 5ea2c75 + 079cf21 commit d4bd145
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hex.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! A module for encoding and decoding hexadecimal strings.
use crate::err;
use terrors::OneOf;

Expand Down Expand Up @@ -152,7 +154,7 @@ impl TryFrom<u8> for HexChar {
impl From<HexChar> for u8 {
/// Converts the character to its [`u8`] equivalent. Eg, 'a' becomes 10.
///
/// SAFETY: self is checked to be a valid hex character by [`HexChar`]'s
/// SAFETY: self is checked to be a valid hex character by `HexChar`'s
/// [`TryFrom`] implementation.
fn from(val: HexChar) -> Self {
val.c as u8 - val.kind.offset()
Expand Down
2 changes: 2 additions & 0 deletions src/macros.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Macros for error handling.
#[macro_export]
macro_rules! err {
($item:expr) => {{
Expand Down
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! A simple faucet server that uses [`axum`] and [`bdk_wallet`]
//! to generate and dispense bitcoin.
pub mod hex;
pub mod macros;

Expand Down

0 comments on commit d4bd145

Please sign in to comment.