Skip to content

Commit 8a404d1

Browse files
authored
chore: Remove allow clippy::derive_partial_eq_without_eq (#1115)
1 parent 7e55cda commit 8a404d1

File tree

13 files changed

+2
-81
lines changed

13 files changed

+2
-81
lines changed

prost-build/src/code_generator.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,6 @@ impl<'a> CodeGenerator<'a> {
228228
self.append_type_attributes(&fq_message_name);
229229
self.append_message_attributes(&fq_message_name);
230230
self.push_indent();
231-
self.buf
232-
.push_str("#[allow(clippy::derive_partial_eq_without_eq)]\n");
233231
self.buf.push_str(&format!(
234232
"#[derive(Clone, {}PartialEq, {}::Message)]\n",
235233
if self.message_graph.can_message_derive_copy(&fq_message_name) {
@@ -616,8 +614,6 @@ impl<'a> CodeGenerator<'a> {
616614
self.append_type_attributes(&oneof_name);
617615
self.append_enum_attributes(&oneof_name);
618616
self.push_indent();
619-
self.buf
620-
.push_str("#[allow(clippy::derive_partial_eq_without_eq)]\n");
621617

622618
let can_oneof_derive_copy = oneof.fields.iter().all(|field| {
623619
self.message_graph
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
// This file is @generated by prost-build.
2-
#[allow(clippy::derive_partial_eq_without_eq)]
32
#[derive(Clone, PartialEq, ::prost::Message)]
43
pub struct Container {
54
#[prost(oneof="container::Data", tags="1, 2")]
65
pub data: ::core::option::Option<container::Data>,
76
}
87
/// Nested message and enum types in `Container`.
98
pub mod container {
10-
#[allow(clippy::derive_partial_eq_without_eq)]
11-
#[derive(Clone, PartialEq, ::prost::Oneof)]
9+
#[derive(Clone, PartialEq, ::prost::Oneof)]
1210
pub enum Data {
1311
#[prost(message, tag="1")]
1412
Foo(::prost::alloc::boxed::Box<super::Foo>),
1513
#[prost(message, tag="2")]
1614
Bar(super::Bar),
1715
}
1816
}
19-
#[allow(clippy::derive_partial_eq_without_eq)]
2017
#[derive(Clone, PartialEq, ::prost::Message)]
2118
pub struct Foo {
2219
#[prost(string, tag="1")]
2320
pub foo: ::prost::alloc::string::String,
2421
}
25-
#[allow(clippy::derive_partial_eq_without_eq)]
2622
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2723
pub struct Bar {
2824
#[prost(message, optional, boxed, tag="1")]
2925
pub qux: ::core::option::Option<::prost::alloc::boxed::Box<Qux>>,
3026
}
31-
#[allow(clippy::derive_partial_eq_without_eq)]
3227
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3328
pub struct Qux {
3429
}
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
// This file is @generated by prost-build.
2-
#[allow(clippy::derive_partial_eq_without_eq)]
32
#[derive(Clone, PartialEq, ::prost::Message)]
43
pub struct Container {
54
#[prost(oneof = "container::Data", tags = "1, 2")]
65
pub data: ::core::option::Option<container::Data>,
76
}
87
/// Nested message and enum types in `Container`.
98
pub mod container {
10-
#[allow(clippy::derive_partial_eq_without_eq)]
119
#[derive(Clone, PartialEq, ::prost::Oneof)]
1210
pub enum Data {
1311
#[prost(message, tag = "1")]
@@ -16,18 +14,15 @@ pub mod container {
1614
Bar(super::Bar),
1715
}
1816
}
19-
#[allow(clippy::derive_partial_eq_without_eq)]
2017
#[derive(Clone, PartialEq, ::prost::Message)]
2118
pub struct Foo {
2219
#[prost(string, tag = "1")]
2320
pub foo: ::prost::alloc::string::String,
2421
}
25-
#[allow(clippy::derive_partial_eq_without_eq)]
2622
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2723
pub struct Bar {
2824
#[prost(message, optional, boxed, tag = "1")]
2925
pub qux: ::core::option::Option<::prost::alloc::boxed::Box<Qux>>,
3026
}
31-
#[allow(clippy::derive_partial_eq_without_eq)]
3227
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3328
pub struct Qux {}

prost-build/src/fixtures/helloworld/_expected_helloworld.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
// This file is @generated by prost-build.
22
#[derive(derive_builder::Builder)]
33
#[derive(custom_proto::Input)]
4-
#[allow(clippy::derive_partial_eq_without_eq)]
54
#[derive(Clone, PartialEq, ::prost::Message)]
65
pub struct Message {
76
#[prost(string, tag="1")]
87
pub say: ::prost::alloc::string::String,
98
}
109
#[derive(derive_builder::Builder)]
1110
#[derive(custom_proto::Output)]
12-
#[allow(clippy::derive_partial_eq_without_eq)]
1311
#[derive(Clone, PartialEq, ::prost::Message)]
1412
pub struct Response {
1513
#[prost(string, tag="1")]

prost-build/src/fixtures/helloworld/_expected_helloworld_formatted.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
// This file is @generated by prost-build.
22
#[derive(derive_builder::Builder)]
33
#[derive(custom_proto::Input)]
4-
#[allow(clippy::derive_partial_eq_without_eq)]
54
#[derive(Clone, PartialEq, ::prost::Message)]
65
pub struct Message {
76
#[prost(string, tag = "1")]
87
pub say: ::prost::alloc::string::String,
98
}
109
#[derive(derive_builder::Builder)]
1110
#[derive(custom_proto::Output)]
12-
#[allow(clippy::derive_partial_eq_without_eq)]
1311
#[derive(Clone, PartialEq, ::prost::Message)]
1412
pub struct Response {
1513
#[prost(string, tag = "1")]

prost-types/src/compiler.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// This file is @generated by prost-build.
22
/// The version number of protocol compiler.
3-
#[allow(clippy::derive_partial_eq_without_eq)]
43
#[derive(Clone, PartialEq, ::prost::Message)]
54
pub struct Version {
65
#[prost(int32, optional, tag = "1")]
@@ -15,7 +14,6 @@ pub struct Version {
1514
pub suffix: ::core::option::Option<::prost::alloc::string::String>,
1615
}
1716
/// An encoded CodeGeneratorRequest is written to the plugin's stdin.
18-
#[allow(clippy::derive_partial_eq_without_eq)]
1917
#[derive(Clone, PartialEq, ::prost::Message)]
2018
pub struct CodeGeneratorRequest {
2119
/// The .proto files that were explicitly listed on the command-line. The
@@ -47,7 +45,6 @@ pub struct CodeGeneratorRequest {
4745
pub compiler_version: ::core::option::Option<Version>,
4846
}
4947
/// The plugin writes an encoded CodeGeneratorResponse to stdout.
50-
#[allow(clippy::derive_partial_eq_without_eq)]
5148
#[derive(Clone, PartialEq, ::prost::Message)]
5249
pub struct CodeGeneratorResponse {
5350
/// Error message. If non-empty, code generation failed. The plugin process
@@ -70,7 +67,6 @@ pub struct CodeGeneratorResponse {
7067
/// Nested message and enum types in `CodeGeneratorResponse`.
7168
pub mod code_generator_response {
7269
/// Represents a single generated file.
73-
#[allow(clippy::derive_partial_eq_without_eq)]
7470
#[derive(Clone, PartialEq, ::prost::Message)]
7571
pub struct File {
7672
/// The file name, relative to the output directory. The name must not

prost-types/src/duration.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ impl fmt::Display for Duration {
127127
}
128128

129129
/// A duration handling error.
130-
#[allow(clippy::derive_partial_eq_without_eq)]
131130
#[derive(Debug, PartialEq)]
132131
#[non_exhaustive]
133132
pub enum DurationError {

0 commit comments

Comments
 (0)