From 75f2922e39b5a47d3fcd874ce63c066dddaf5320 Mon Sep 17 00:00:00 2001 From: Yukiteru Date: Thu, 26 Sep 2024 21:21:54 +0800 Subject: [PATCH] chore: fix new clippy rule `empty_line_after_doc_comments` (#505) > 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: > 36 ~ // /// > 37 ~ // /// This is unimplemented yet. > | > > error: could not compile `volo-thrift` (lib) due to 1 previous error Signed-off-by: Yu Li --- volo-grpc/src/status.rs | 1 - volo-thrift/src/codec/default/thrift.rs | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/volo-grpc/src/status.rs b/volo-grpc/src/status.rs index 4afe731b..1e519ce3 100644 --- a/volo-grpc/src/status.rs +++ b/volo-grpc/src/status.rs @@ -169,7 +169,6 @@ impl Status { } /// Create a new [`Status`] with the associated code and message. - pub fn new(code: Code, message: impl Into) -> Self { Self { code, diff --git a/volo-thrift/src/codec/default/thrift.rs b/volo-thrift/src/codec/default/thrift.rs index b49eeac0..fc0a5d50 100644 --- a/volo-thrift/src/codec/default/thrift.rs +++ b/volo-thrift/src/codec/default/thrift.rs @@ -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: - /// - /// 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: + // /// + // /// This is unimplemented yet. // pub fn with_multiplex(mut self, multiplex: bool) -> Self { // self.multiplex = multiplex; // self