Commit 9cb491f3 authored by Qinxuan Chen's avatar Qinxuan Chen

Fix clippy warnings, but ICE

Signed-off-by: Qinxuan Chen's avatarkoushiro <koushiro.cqx@gmail.com>
parent f3236e7c
Pipeline #56233 failed with stages
in 4 minutes and 39 seconds
...@@ -172,6 +172,7 @@ impl ContractSpecBuilder<Valid> { ...@@ -172,6 +172,7 @@ impl ContractSpecBuilder<Valid> {
impl ContractSpec { impl ContractSpec {
/// Creates a new contract specification. /// Creates a new contract specification.
#[allow(clippy::new_ret_no_self)]
pub fn new(name: <MetaForm as Form>::String) -> ContractSpecBuilder { pub fn new(name: <MetaForm as Form>::String) -> ContractSpecBuilder {
ContractSpecBuilder { ContractSpecBuilder {
spec: Self { spec: Self {
...@@ -232,6 +233,7 @@ pub struct ConstructorSpecBuilder<Selector> { ...@@ -232,6 +233,7 @@ pub struct ConstructorSpecBuilder<Selector> {
impl ConstructorSpec { impl ConstructorSpec {
/// Creates a new constructor spec builder. /// Creates a new constructor spec builder.
#[allow(clippy::new_ret_no_self)]
pub fn new( pub fn new(
name: <MetaForm as Form>::String, name: <MetaForm as Form>::String,
) -> ConstructorSpecBuilder<Missing<state::Selector>> { ) -> ConstructorSpecBuilder<Missing<state::Selector>> {
...@@ -328,6 +330,7 @@ mod state { ...@@ -328,6 +330,7 @@ mod state {
impl MessageSpec { impl MessageSpec {
/// Creates a new message spec builder. /// Creates a new message spec builder.
#[allow(clippy::new_ret_no_self)]
pub fn new( pub fn new(
name: <MetaForm as Form>::String, name: <MetaForm as Form>::String,
) -> MessageSpecBuilder< ) -> MessageSpecBuilder<
...@@ -521,6 +524,7 @@ impl IntoCompact for EventSpec { ...@@ -521,6 +524,7 @@ impl IntoCompact for EventSpec {
impl EventSpec { impl EventSpec {
/// Creates a new event specification builder. /// Creates a new event specification builder.
#[allow(clippy::new_ret_no_self)]
pub fn new(name: &'static str) -> EventSpecBuilder { pub fn new(name: &'static str) -> EventSpecBuilder {
EventSpecBuilder { EventSpecBuilder {
spec: Self { spec: Self {
...@@ -669,6 +673,7 @@ impl IntoCompact for EventParamSpec { ...@@ -669,6 +673,7 @@ impl IntoCompact for EventParamSpec {
impl EventParamSpec { impl EventParamSpec {
/// Creates a new event parameter specification builder. /// Creates a new event parameter specification builder.
#[allow(clippy::new_ret_no_self)]
pub fn new(name: &'static str) -> EventParamSpecBuilder { pub fn new(name: &'static str) -> EventParamSpecBuilder {
EventParamSpecBuilder { EventParamSpecBuilder {
spec: Self { spec: Self {
...@@ -774,6 +779,7 @@ impl IntoCompact for MessageParamSpec { ...@@ -774,6 +779,7 @@ impl IntoCompact for MessageParamSpec {
impl MessageParamSpec { impl MessageParamSpec {
/// Constructs a new message parameter specification via builder. /// Constructs a new message parameter specification via builder.
#[allow(clippy::new_ret_no_self)]
pub fn new(name: &'static str) -> MessageParamSpecBuilder { pub fn new(name: &'static str) -> MessageParamSpecBuilder {
MessageParamSpecBuilder { MessageParamSpecBuilder {
spec: Self { spec: Self {
...@@ -805,6 +811,7 @@ impl MessageParamSpecBuilder { ...@@ -805,6 +811,7 @@ impl MessageParamSpecBuilder {
} }
} }
#[allow(clippy::trivially_copy_pass_by_ref)]
fn serialize_selector<S>(s: &[u8; 4], serializer: S) -> Result<S::Ok, S::Error> fn serialize_selector<S>(s: &[u8; 4], serializer: S) -> Result<S::Ok, S::Error>
where where
S: Serializer, S: Serializer,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment