Skip to content

Fix doc warnings and doc cleanup in msgs.rs/ser.rs #1950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

tnull
Copy link
Contributor

@tnull tnull commented Jan 13, 2023

This PR fixes a number of doc warnings, and since I was already touching the docs there I included some cleanups of the docs in msgs.rs and ser.rs.

Mostly nits, a lot of ticking and linking.

@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2023

Codecov Report

Base: 90.73% // Head: 90.69% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (cc3b4e6) compared to base (e8b91a4).
Patch coverage: 58.33% of modified lines in pull request are covered.

❗ Current head cc3b4e6 differs from pull request most recent head defa2f6. Consider uploading reports for the commit defa2f6 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1950      +/-   ##
==========================================
- Coverage   90.73%   90.69%   -0.05%     
==========================================
  Files          97       97              
  Lines       50540    50540              
  Branches    50540    50540              
==========================================
- Hits        45859    45836      -23     
- Misses       4681     4704      +23     
Impacted Files Coverage Δ
lightning-invoice/src/lib.rs 87.48% <ø> (ø)
lightning/src/ln/channel.rs 88.76% <ø> (ø)
lightning/src/ln/msgs.rs 86.02% <ø> (ø)
lightning/src/ln/outbound_payment.rs 89.26% <ø> (ø)
lightning/src/ln/peer_handler.rs 55.82% <ø> (ø)
lightning/src/util/config.rs 65.90% <ø> (ø)
lightning/src/util/ser.rs 91.84% <ø> (ø)
lightning/src/util/ser_macros.rs 87.03% <58.33%> (ø)
lightning/src/chain/onchaintx.rs 94.33% <0.00%> (-1.05%) ⬇️
lightning-invoice/src/utils.rs 97.02% <0.00%> (-0.75%) ⬇️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tnull tnull force-pushed the 2023-01-fix-doc-warnings-and-nits branch from 548a072 to 9dfc23e Compare January 13, 2023 19:47
@TheBlueMatt
Copy link
Collaborator

Feel free to squash.

@tnull
Copy link
Contributor Author

tnull commented Jan 13, 2023

Feel free to squash.

Just added another commit to fix building docs with --document-private-items.

wpaulino
wpaulino previously approved these changes Jan 13, 2023
@tnull tnull force-pushed the 2023-01-fix-doc-warnings-and-nits branch 3 times, most recently from 07e34fe to e2f232a Compare January 13, 2023 22:28
@wpaulino
Copy link
Contributor

Feel free to squash. CI failing with:

error: doctest failed, to rerun pass `--doc`
 --> src/util/ser_macros.rs:805:1
  |
3 | impl_writeable_tlv_based_enum!(EnumName,
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: consider importing this macro:
          lightning::impl_writeable_tlv_based_enum

@tnull tnull force-pushed the 2023-01-fix-doc-warnings-and-nits branch from e2f232a to cc3b4e6 Compare January 14, 2023 00:03
@tnull
Copy link
Contributor Author

tnull commented Jan 14, 2023

Feel free to squash. CI failing with:
...

Ah, lol. Now hopefully fixed by squashing commits and including:

> git diff-tree -U2 e2f232ae cc3b4e6e
diff --git a/lightning/src/util/ser_macros.rs b/lightning/src/util/ser_macros.rs
index 9b4a6295..8d74a83a 100644
--- a/lightning/src/util/ser_macros.rs
+++ b/lightning/src/util/ser_macros.rs
@@ -802,5 +802,5 @@ macro_rules! _impl_writeable_tlv_based_enum_common {
 /// variants stored directly.
 /// The format is, for example
-/// ```
+/// ```ignore
 /// impl_writeable_tlv_based_enum!(EnumName,
 ///   (0, StructVariantA) => {(0, required_variant_field, required), (1, optional_variant_field, option)},

@tnull tnull force-pushed the 2023-01-fix-doc-warnings-and-nits branch from cc3b4e6 to defa2f6 Compare January 14, 2023 00:26
@tnull
Copy link
Contributor Author

tnull commented Jan 14, 2023

... and had to include two more ignores:

> git diff-tree -U1 cc3b4e6e defa2f68
diff --git a/lightning-invoice/src/lib.rs b/lightning-invoice/src/lib.rs
index 50ef3e4a..c01dfa47 100644
--- a/lightning-invoice/src/lib.rs
+++ b/lightning-invoice/src/lib.rs
@@ -808,3 +808,3 @@ impl SignedRawInvoice {
 ///
-/// ```
+/// ```ignore
 /// enum Enum {
@@ -829,3 +829,3 @@ macro_rules! find_extract {
 ///
-/// ```
+/// ```ignore
 /// enum Enum {

@@ -727,22 +814,26 @@ pub struct QueryShortChannelIds {
pub short_channel_ids: Vec<u64>,
}

/// A reply_short_channel_ids_end message is sent as a reply to a
/// query_short_channel_ids message. The query recipient makes a best
/// A [`reply_short_channel_ids_end message`] is sent as a reply to a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra text in the []

@TheBlueMatt TheBlueMatt merged commit ce6bcf6 into lightningdevkit:main Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants