Skip to content

Commit

Permalink
chore: fix new clippy rule empty_line_after_doc_comments (#505)
Browse files Browse the repository at this point in the history
> error: empty line after doc comment
>   --> volo-thrift/src/codec/default/thrift.rs:37:5
>    |
> 37 | /     /// This is unimplemented yet.
> 38 | |     // pub fn with_multiplex(mut self, multiplex: bool) -> Self {
> 39 | |     //     self.multiplex = multiplex;
> 40 | |     //     self
> 41 | |     // }
> 42 | |
>    | |_
> ...
> 45 |       pub fn with_protocol(mut self, protocol: Protocol) -> Self {
>    |       ---------------------------------------------------------- the comment documents this method
>    |
>    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
>    = note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
>    = help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
>    = help: if the empty line is unintentional remove it
> help: if the doc comment should not document `with_protocol` comment it out
>    |
> 29 ~     // /// Whether to use thrift multiplex protocol.
> 30 ~     // ///
> 31 ~     // /// When the multiplexed protocol is used, the name contains the service name,
> 32 ~     // /// a colon : and the method name. The multiplexed protocol is not compatible
> 33 ~     // /// with other protocols.
> 34 ~     // ///
> 35 ~     // /// Spec: <https://github.com/apache/thrift/blob/master/doc/specs/thrift-rpc.md>
> 36 ~     // ///
> 37 ~     // /// This is unimplemented yet.
>    |
>
> error: could not compile `volo-thrift` (lib) due to 1 previous error

Signed-off-by: Yu Li <[email protected]>
  • Loading branch information
yukiiiteru authored Sep 26, 2024
1 parent 2134818 commit 75f2922
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion volo-grpc/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ impl Status {
}

/// Create a new [`Status`] with the associated code and message.
pub fn new(code: Code, message: impl Into<String>) -> Self {
Self {
code,
Expand Down
18 changes: 9 additions & 9 deletions volo-thrift/src/codec/default/thrift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ impl MakeThriftCodec {
}
}

/// Whether to use thrift multiplex protocol.
///
/// When the multiplexed protocol is used, the name contains the service name,
/// a colon : and the method name. The multiplexed protocol is not compatible
/// with other protocols.
///
/// Spec: <https://github.com/apache/thrift/blob/master/doc/specs/thrift-rpc.md>
///
/// This is unimplemented yet.
// /// Whether to use thrift multiplex protocol.
// ///
// /// When the multiplexed protocol is used, the name contains the service name,
// /// a colon : and the method name. The multiplexed protocol is not compatible
// /// with other protocols.
// ///
// /// Spec: <https://github.com/apache/thrift/blob/master/doc/specs/thrift-rpc.md>
// ///
// /// This is unimplemented yet.
// pub fn with_multiplex(mut self, multiplex: bool) -> Self {
// self.multiplex = multiplex;
// self
Expand Down

0 comments on commit 75f2922

Please sign in to comment.