1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

chore: fix clippy warnings (#15944)

Stop allowing clippy::derive-partial-eq-without-eq and fix warnings
about deriving PartialEq without also deriving Eq.

In one case I removed the PartialEq because it a) wasn't necessary,
and b) sketchy because it was comparing floating point numbers.

IMO, that's a good argument for enforcing the lint rule, because it
would most likely have been caught during review if it had been enabled.
This commit is contained in:
Ben Noordhuis 2022-09-19 10:25:03 +02:00 committed by GitHub
parent a4a894fa1e
commit b1b418b81a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 57 additions and 57 deletions

View file

@ -23,6 +23,4 @@ rustflags = [
"clippy::missing_safety_doc", "clippy::missing_safety_doc",
"-D", "-D",
"clippy::undocumented_unsafe_blocks", "clippy::undocumented_unsafe_blocks",
"-A",
"clippy::derive-partial-eq-without-eq",
] ]

View file

@ -63,7 +63,7 @@ pub struct CompilerOptions {
/// A structure that represents a set of options that were ignored and the /// A structure that represents a set of options that were ignored and the
/// path those options came from. /// path those options came from.
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, Eq, PartialEq)]
pub struct IgnoredCompilerOptions { pub struct IgnoredCompilerOptions {
pub items: Vec<String>, pub items: Vec<String>,
pub maybe_specifier: Option<ModuleSpecifier>, pub maybe_specifier: Option<ModuleSpecifier>,

View file

@ -45,30 +45,30 @@ static SHORT_VERSION: Lazy<String> = Lazy::new(|| {
.to_string() .to_string()
}); });
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct BenchFlags { pub struct BenchFlags {
pub ignore: Vec<PathBuf>, pub ignore: Vec<PathBuf>,
pub include: Option<Vec<String>>, pub include: Option<Vec<String>>,
pub filter: Option<String>, pub filter: Option<String>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct BundleFlags { pub struct BundleFlags {
pub source_file: String, pub source_file: String,
pub out_file: Option<PathBuf>, pub out_file: Option<PathBuf>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct CacheFlags { pub struct CacheFlags {
pub files: Vec<String>, pub files: Vec<String>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct CheckFlags { pub struct CheckFlags {
pub files: Vec<String>, pub files: Vec<String>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct CompileFlags { pub struct CompileFlags {
pub source_file: String, pub source_file: String,
pub output: Option<PathBuf>, pub output: Option<PathBuf>,
@ -76,12 +76,12 @@ pub struct CompileFlags {
pub target: Option<String>, pub target: Option<String>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct CompletionsFlags { pub struct CompletionsFlags {
pub buf: Box<[u8]>, pub buf: Box<[u8]>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct CoverageFlags { pub struct CoverageFlags {
pub files: Vec<PathBuf>, pub files: Vec<PathBuf>,
pub output: Option<PathBuf>, pub output: Option<PathBuf>,
@ -91,7 +91,7 @@ pub struct CoverageFlags {
pub lcov: bool, pub lcov: bool,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct DocFlags { pub struct DocFlags {
pub private: bool, pub private: bool,
pub json: bool, pub json: bool,
@ -99,14 +99,14 @@ pub struct DocFlags {
pub filter: Option<String>, pub filter: Option<String>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct EvalFlags { pub struct EvalFlags {
pub print: bool, pub print: bool,
pub code: String, pub code: String,
pub ext: String, pub ext: String,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct FmtFlags { pub struct FmtFlags {
pub check: bool, pub check: bool,
pub files: Vec<PathBuf>, pub files: Vec<PathBuf>,
@ -119,18 +119,18 @@ pub struct FmtFlags {
pub prose_wrap: Option<String>, pub prose_wrap: Option<String>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct InitFlags { pub struct InitFlags {
pub dir: Option<String>, pub dir: Option<String>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct InfoFlags { pub struct InfoFlags {
pub json: bool, pub json: bool,
pub file: Option<String>, pub file: Option<String>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct InstallFlags { pub struct InstallFlags {
pub module_url: String, pub module_url: String,
pub args: Vec<String>, pub args: Vec<String>,
@ -139,13 +139,13 @@ pub struct InstallFlags {
pub force: bool, pub force: bool,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct UninstallFlags { pub struct UninstallFlags {
pub name: String, pub name: String,
pub root: Option<PathBuf>, pub root: Option<PathBuf>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct LintFlags { pub struct LintFlags {
pub files: Vec<PathBuf>, pub files: Vec<PathBuf>,
pub ignore: Vec<PathBuf>, pub ignore: Vec<PathBuf>,
@ -156,13 +156,13 @@ pub struct LintFlags {
pub json: bool, pub json: bool,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct ReplFlags { pub struct ReplFlags {
pub eval_files: Option<Vec<String>>, pub eval_files: Option<Vec<String>>,
pub eval: Option<String>, pub eval: Option<String>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct RunFlags { pub struct RunFlags {
pub script: String, pub script: String,
} }
@ -173,13 +173,13 @@ impl RunFlags {
} }
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct TaskFlags { pub struct TaskFlags {
pub cwd: Option<String>, pub cwd: Option<String>,
pub task: String, pub task: String,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct TestFlags { pub struct TestFlags {
pub ignore: Vec<PathBuf>, pub ignore: Vec<PathBuf>,
pub doc: bool, pub doc: bool,
@ -193,7 +193,7 @@ pub struct TestFlags {
pub trace_ops: bool, pub trace_ops: bool,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct UpgradeFlags { pub struct UpgradeFlags {
pub dry_run: bool, pub dry_run: bool,
pub force: bool, pub force: bool,
@ -203,14 +203,14 @@ pub struct UpgradeFlags {
pub ca_file: Option<String>, pub ca_file: Option<String>,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct VendorFlags { pub struct VendorFlags {
pub specifiers: Vec<String>, pub specifiers: Vec<String>,
pub output_path: Option<PathBuf>, pub output_path: Option<PathBuf>,
pub force: bool, pub force: bool,
} }
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub enum DenoSubcommand { pub enum DenoSubcommand {
Bench(BenchFlags), Bench(BenchFlags),
Bundle(BundleFlags), Bundle(BundleFlags),
@ -246,7 +246,7 @@ impl Default for DenoSubcommand {
} }
} }
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum TypeCheckMode { pub enum TypeCheckMode {
/// Type-check all modules. /// Type-check all modules.
All, All,
@ -264,7 +264,7 @@ impl Default for TypeCheckMode {
} }
} }
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, Eq, PartialEq)]
pub enum ConfigFlag { pub enum ConfigFlag {
Discover, Discover,
Path(String), Path(String),
@ -277,7 +277,7 @@ impl Default for ConfigFlag {
} }
} }
#[derive(Clone, Debug, PartialEq, Default)] #[derive(Clone, Debug, Eq, PartialEq, Default)]
pub struct Flags { pub struct Flags {
/// Vector of CLI arguments - these are user script arguments, all Deno /// Vector of CLI arguments - these are user script arguments, all Deno
/// specific flags are removed. /// specific flags are removed.

View file

@ -199,7 +199,7 @@ impl CacheSemantics {
} }
} }
#[derive(Debug, PartialEq)] #[derive(Debug, Eq, PartialEq)]
pub enum FetchOnceResult { pub enum FetchOnceResult {
Code(Vec<u8>, HeadersMap), Code(Vec<u8>, HeadersMap),
NotModified, NotModified,

View file

@ -41,7 +41,7 @@ struct BenchSpecifierOptions {
filter: Option<String>, filter: Option<String>,
} }
#[derive(Debug, Clone, PartialEq, Deserialize)] #[derive(Debug, Clone, Eq, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct BenchPlan { pub struct BenchPlan {
pub total: usize, pub total: usize,
@ -60,7 +60,7 @@ pub enum BenchEvent {
Result(usize, BenchResult), Result(usize, BenchResult),
} }
#[derive(Debug, Clone, PartialEq, Deserialize)] #[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub enum BenchResult { pub enum BenchResult {
Ok(BenchStats), Ok(BenchStats),
@ -84,7 +84,7 @@ pub struct BenchDescription {
pub group: Option<String>, pub group: Option<String>,
} }
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BenchStats { pub struct BenchStats {
pub n: u64, pub n: u64,
pub min: f64, pub min: f64,

View file

@ -59,7 +59,7 @@ use tokio::sync::mpsc::unbounded_channel;
use tokio::sync::mpsc::UnboundedSender; use tokio::sync::mpsc::UnboundedSender;
/// The test mode is used to determine how a specifier is to be tested. /// The test mode is used to determine how a specifier is to be tested.
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, Eq, PartialEq)]
pub enum TestMode { pub enum TestMode {
/// Test as documentation, type-checking fenced code blocks. /// Test as documentation, type-checking fenced code blocks.
Documentation, Documentation,
@ -144,13 +144,14 @@ impl TestDescription {
} }
} }
#[derive(Debug, Clone, PartialEq, Deserialize)] #[derive(Debug, Clone, Eq, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub enum TestOutput { pub enum TestOutput {
String(String), String(String),
Bytes(Vec<u8>), Bytes(Vec<u8>),
} }
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, Clone, PartialEq, Deserialize)] #[derive(Debug, Clone, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub enum TestResult { pub enum TestResult {
@ -160,7 +161,7 @@ pub enum TestResult {
Cancelled, Cancelled,
} }
#[derive(Debug, Clone, PartialEq, Deserialize)] #[derive(Debug, Clone, Eq, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct TestStepDescription { pub struct TestStepDescription {
pub id: usize, pub id: usize,
@ -183,6 +184,7 @@ impl TestStepDescription {
} }
} }
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, Clone, PartialEq, Deserialize)] #[derive(Debug, Clone, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub enum TestStepResult { pub enum TestStepResult {
@ -202,7 +204,7 @@ impl TestStepResult {
} }
} }
#[derive(Debug, Clone, PartialEq, Deserialize)] #[derive(Debug, Clone, Eq, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct TestPlan { pub struct TestPlan {
pub origin: String, pub origin: String,

View file

@ -134,7 +134,7 @@ pub struct JsError {
pub aggregated: Option<Vec<JsError>>, pub aggregated: Option<Vec<JsError>>,
} }
#[derive(Debug, PartialEq, Clone, serde::Deserialize, serde::Serialize)] #[derive(Debug, Eq, PartialEq, Clone, serde::Deserialize, serde::Serialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct JsStackFrame { pub struct JsStackFrame {
pub type_name: Option<String>, pub type_name: Option<String>,

View file

@ -17,7 +17,7 @@ pub enum KeyType {
Secret, Secret,
} }
#[derive(Serialize, Deserialize, Copy, Clone, PartialEq)] #[derive(Serialize, Deserialize, Copy, Clone, Eq, PartialEq)]
pub enum CryptoHash { pub enum CryptoHash {
#[serde(rename = "SHA-1")] #[serde(rename = "SHA-1")]
Sha1, Sha1,
@ -98,7 +98,7 @@ impl hkdf::KeyType for HkdfOutput<usize> {
} }
} }
#[derive(Serialize, Deserialize, Copy, Clone, Debug, PartialEq)] #[derive(Serialize, Deserialize, Copy, Clone, Debug, Eq, PartialEq)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub enum KeyUsage { pub enum KeyUsage {
Encrypt, Encrypt,

View file

@ -46,7 +46,7 @@ pub const ID_SECP384R1_OID: const_oid::ObjectIdentifier =
pub const ID_SECP521R1_OID: const_oid::ObjectIdentifier = pub const ID_SECP521R1_OID: const_oid::ObjectIdentifier =
const_oid::ObjectIdentifier::new_unwrap("1.3.132.0.35"); const_oid::ObjectIdentifier::new_unwrap("1.3.132.0.35");
#[derive(Serialize, Deserialize, Copy, Clone, PartialEq)] #[derive(Serialize, Deserialize, Copy, Clone, Eq, PartialEq)]
pub enum ShaHash { pub enum ShaHash {
#[serde(rename = "SHA-1")] #[serde(rename = "SHA-1")]
Sha1, Sha1,
@ -58,7 +58,7 @@ pub enum ShaHash {
Sha512, Sha512,
} }
#[derive(Serialize, Deserialize, Copy, Clone, PartialEq)] #[derive(Serialize, Deserialize, Copy, Clone, Eq, PartialEq)]
pub enum EcNamedCurve { pub enum EcNamedCurve {
#[serde(rename = "P-256")] #[serde(rename = "P-256")]
P256, P256,

View file

@ -86,7 +86,7 @@ pub struct ServerContext {
cancel_handle: Rc<CancelHandle>, cancel_handle: Rc<CancelHandle>,
} }
#[derive(Debug, PartialEq)] #[derive(Debug, Eq, PartialEq)]
pub enum ParseStatus { pub enum ParseStatus {
None, None,
Ongoing(usize), Ongoing(usize),

View file

@ -569,7 +569,7 @@ where
} }
} }
#[derive(Serialize, PartialEq, Debug)] #[derive(Serialize, Eq, PartialEq, Debug)]
#[serde(untagged)] #[serde(untagged)]
pub enum DnsReturnRecord { pub enum DnsReturnRecord {
A(String), A(String),

View file

@ -128,7 +128,7 @@ fn parse_url(
} }
} }
#[derive(PartialEq, Debug)] #[derive(Eq, PartialEq, Debug)]
#[repr(u8)] #[repr(u8)]
pub enum UrlSetter { pub enum UrlSetter {
Hash = 0, Hash = 0,

View file

@ -32,7 +32,7 @@ pub fn init() -> Extension {
.build() .build()
} }
#[derive(Copy, Clone, PartialEq, Deserialize)] #[derive(Copy, Clone, Eq, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub enum Stdio { pub enum Stdio {
Inherit, Inherit,
@ -50,7 +50,7 @@ impl Stdio {
} }
} }
#[derive(Copy, Clone, PartialEq)] #[derive(Copy, Clone, Eq, PartialEq)]
pub enum StdioOrRid { pub enum StdioOrRid {
Stdio(Stdio), Stdio(Stdio),
Rid(ResourceId), Rid(ResourceId),

View file

@ -34,7 +34,7 @@ static DEBUG_LOG_ENABLED: Lazy<bool> =
Lazy::new(|| log::log_enabled!(log::Level::Debug)); Lazy::new(|| log::log_enabled!(log::Level::Debug));
/// Tri-state value for storing permission state /// Tri-state value for storing permission state
#[derive(PartialEq, Debug, Clone, Copy, Deserialize, PartialOrd)] #[derive(Eq, PartialEq, Debug, Clone, Copy, Deserialize, PartialOrd)]
pub enum PermissionState { pub enum PermissionState {
Granted = 0, Granted = 0,
Prompt = 1, Prompt = 1,
@ -135,7 +135,7 @@ impl Default for PermissionState {
} }
} }
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, Eq, PartialEq)]
pub struct UnitPermission { pub struct UnitPermission {
pub name: &'static str, pub name: &'static str,
pub description: &'static str, pub description: &'static str,
@ -207,7 +207,7 @@ impl AsRef<str> for EnvVarName {
} }
} }
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, Eq, PartialEq)]
pub struct UnaryPermission<T: Eq + Hash> { pub struct UnaryPermission<T: Eq + Hash> {
pub name: &'static str, pub name: &'static str,
pub description: &'static str, pub description: &'static str,
@ -1133,7 +1133,7 @@ impl Default for UnaryPermission<FfiDescriptor> {
} }
} }
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, Eq, PartialEq)]
pub struct Permissions { pub struct Permissions {
pub read: UnaryPermission<ReadDescriptor>, pub read: UnaryPermission<ReadDescriptor>,
pub write: UnaryPermission<WriteDescriptor>, pub write: UnaryPermission<WriteDescriptor>,
@ -1158,7 +1158,7 @@ impl Default for Permissions {
} }
} }
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] #[derive(Clone, Debug, Eq, PartialEq, Default, Serialize, Deserialize)]
pub struct PermissionsOptions { pub struct PermissionsOptions {
pub allow_env: Option<Vec<String>>, pub allow_env: Option<Vec<String>>,
pub allow_hrtime: bool, pub allow_hrtime: bool,
@ -1490,7 +1490,7 @@ fn escalation_error() -> AnyError {
) )
} }
#[derive(Debug, PartialEq)] #[derive(Debug, Eq, PartialEq)]
pub enum ChildUnitPermissionArg { pub enum ChildUnitPermissionArg {
Inherit, Inherit,
Granted, Granted,
@ -1542,7 +1542,7 @@ impl<'de> Deserialize<'de> for ChildUnitPermissionArg {
} }
} }
#[derive(Debug, PartialEq)] #[derive(Debug, Eq, PartialEq)]
pub enum ChildUnaryPermissionArg { pub enum ChildUnaryPermissionArg {
Inherit, Inherit,
Granted, Granted,
@ -1610,7 +1610,7 @@ impl<'de> Deserialize<'de> for ChildUnaryPermissionArg {
} }
/// Directly deserializable from JS worker and test permission options. /// Directly deserializable from JS worker and test permission options.
#[derive(Debug, PartialEq)] #[derive(Debug, Eq, PartialEq)]
pub struct ChildPermissionsArg { pub struct ChildPermissionsArg {
env: ChildUnaryPermissionArg, env: ChildUnaryPermissionArg,
hrtime: ChildUnitPermissionArg, hrtime: ChildUnitPermissionArg,

View file

@ -5,7 +5,7 @@ use serde::{de, ser};
pub type Result<T> = std::result::Result<T, Error>; pub type Result<T> = std::result::Result<T, Error>;
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, Eq, PartialEq)]
#[non_exhaustive] #[non_exhaustive]
pub enum Error { pub enum Error {
Message(String), Message(String),

View file

@ -319,7 +319,7 @@ detest!(
defail!(defail_struct, MathOp, "123", |e| e defail!(defail_struct, MathOp, "123", |e| e
== Err(Error::ExpectedObject)); == Err(Error::ExpectedObject));
#[derive(PartialEq, Debug, Deserialize)] #[derive(Eq, PartialEq, Debug, Deserialize)]
pub struct SomeThing { pub struct SomeThing {
pub a: String, pub a: String,
#[serde(default)] #[serde(default)]
@ -339,7 +339,7 @@ detest!(de_bstr, ByteString, "'hello'", "hello".into());
defail!(defail_bstr, ByteString, "'👋bye'", |e| e defail!(defail_bstr, ByteString, "'👋bye'", |e| e
== Err(Error::ExpectedLatin1)); == Err(Error::ExpectedLatin1));
#[derive(PartialEq, Debug, Deserialize)] #[derive(Eq, PartialEq, Debug, Deserialize)]
pub struct StructWithBytes { pub struct StructWithBytes {
#[serde(with = "serde_bytes")] #[serde(with = "serde_bytes")]
a: Vec<u8>, a: Vec<u8>,