Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit 130a123

Browse files
committed
Fix doctest 1.14.0 issues
1 parent 0ed4981 commit 130a123

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/de.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ impl FromStr for SiPrefix {
200200
}
201201

202202
/// ```
203-
/// # extern crate lightning_invoice;
204203
/// use lightning_invoice::Invoice;
205204
///
206205
/// let invoice = "lnbc1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdp\
@@ -220,7 +219,6 @@ impl FromStr for Invoice {
220219
}
221220

222221
/// ```
223-
/// # extern crate lightning_invoice;
224222
/// use lightning_invoice::*;
225223
///
226224
/// let invoice = "lnbc1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdp\

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ pub use de::{ParseError, ParseOrSemanticError};
2424
/// that only a semantically and syntactically correct Invoice can be built using it.
2525
///
2626
/// ```
27-
/// # extern crate secp256k1;
28-
/// # extern crate lightning_invoice;
27+
/// extern crate secp256k1;
28+
/// extern crate lightning_invoice;
2929
///
3030
/// use secp256k1::Secp256k1;
3131
/// use secp256k1::key::SecretKey;
3232
///
3333
/// use lightning_invoice::{Currency, InvoiceBuilder};
3434
///
35+
/// # fn main() {
3536
/// let private_key = SecretKey::from_slice(
3637
/// &Secp256k1::without_caps(),
3738
/// &[
@@ -50,6 +51,7 @@ pub use de::{ParseError, ParseOrSemanticError};
5051
/// .unwrap();
5152
///
5253
/// assert!(invoice.to_string().starts_with("lnbc1"));
54+
/// # }
5355
/// ```
5456
///
5557
/// # Type parameters
@@ -713,7 +715,6 @@ impl Invoice {
713715

714716
/// Constructs an `Invoice` from a `SignedInvoice` by checking all its invariants.
715717
/// ```
716-
/// # extern crate lightning_invoice;
717718
/// use lightning_invoice::*;
718719
///
719720
/// let invoice = "lnbc1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdp\

0 commit comments

Comments
 (0)