Skip to content
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

fix(volo-thrift): fix clippy lint too_long_first_doc_paragraph #490

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

yukiiiteru
Copy link
Member

Motivation

https://rust-lang.github.io/rust-clippy/master/index.html#/too_long_first_doc_paragraph

$ cargo clippy -p volo-thrift --no-default-features -- --deny warnings
    Checking volo v0.10.2 (/root/volo/volo)
error: first doc comment paragraph is too long
  --> volo/src/discovery/mod.rs:66:1
   |
66 | / /// [`diff_address`] provides a naive implementation that compares prev and next only by the
67 | | /// address, and returns the [`Change`], which means that the `updated` is always empty when using
68 | | /// this implementation.
69 | | ///
70 | | /// The bool in the return value indicates whether there's diff between prev and next, which means
   | |_
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
   = note: `-D clippy::too-long-first-doc-paragraph` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::too_long_first_doc_paragraph)]`

error: could not compile `volo` (lib) due to 1 previous error


$ cargo clippy -p volo-thrift --no-default-features -- --deny warnings
    Checking volo-thrift v0.10.3 (/root/volo/volo-thrift)
error: first doc comment paragraph is too long
  --> volo-thrift/src/codec/default/mod.rs:48:1
   |
48 | / /// [`ZeroCopyEncoder`] tries to encode a message without copying large data taking the advantage
49 | | /// of [`LinkedBytes`], which can insert a [`Bytes`] into the middle of a [`bytes::BytesMut`] and
50 | | /// uses writev.
51 | | ///
52 | | /// The recommended length threshold to use `LinkedBytes::insert` is 4KB.
   | |_
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
   = note: `-D clippy::too-long-first-doc-paragraph` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::too_long_first_doc_paragraph)]`

error: first doc comment paragraph is too long
  --> volo-thrift/src/codec/default/mod.rs:77:1
   |
77 | / /// [`ZeroCopyDecoder`] tries to decode a message without copying large data, so the [`Bytes`] in
78 | | /// the `decode` method is not designed to be reused, and the implementation can use
79 | | /// `Bytes::split_to` to get a [`Bytes`] and hand it to the user directly.
   | |_
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph

error: could not compile `volo-thrift` (lib) due to 2 previous errors

Solution

Add short first doc paragraphs for those idents.

@yukiiiteru yukiiiteru requested review from a team as code owners August 26, 2024 09:46
@yukiiiteru yukiiiteru merged commit f2b7f7c into cloudwego:main Aug 26, 2024
15 checks passed
@yukiiiteru yukiiiteru deleted the fix/doc branch September 26, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants