Skip to content

Commit 27ae7b7

Browse files
committed
Reorganize code, Add comments
1 parent f9b35d1 commit 27ae7b7

File tree

7 files changed

+400
-368
lines changed

7 files changed

+400
-368
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![deny(non_snake_case)]
55
#![deny(unused_mut)]
66

7-
//! Lightning Payments Implementation
7+
//! # Lightning Payments Implementation
88
//!
99
//! This is an implementation of
1010
//! [Lightning BOLT11 Specification](https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md)

src/macros.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#[macro_export]
21
/// Creates a HashMap containing the arguments
32
///
43
/// - Create a HashMap containing a given list of elements:
@@ -16,7 +15,14 @@ macro_rules! hashmap {
1615
}}
1716
}
1817

19-
/// verify that an expression matches a patter
18+
/// Verify that an expression matches a pattern
19+
///
20+
/// ```
21+
/// let a = Some(42);
22+
/// let b = Some(42);
23+
///
24+
/// assert!(matches!(a, b);
25+
///
2026
macro_rules! matches {
2127
($e:expr, $p:pat) => (
2228
match $e {

0 commit comments

Comments
 (0)