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> {
impl ContractSpec {
/// Creates a new contract specification.
#[allow(clippy::new_ret_no_self)]
pub fn new(name: <MetaForm as Form>::String) -> ContractSpecBuilder {
ContractSpecBuilder {
spec: Self {
......@@ -232,6 +233,7 @@ pub struct ConstructorSpecBuilder<Selector> {
impl ConstructorSpec {
/// Creates a new constructor spec builder.
#[allow(clippy::new_ret_no_self)]
pub fn new(
name: <MetaForm as Form>::String,
) -> ConstructorSpecBuilder<Missing<state::Selector>> {
......@@ -328,6 +330,7 @@ mod state {
impl MessageSpec {
/// Creates a new message spec builder.
#[allow(clippy::new_ret_no_self)]
pub fn new(
name: <MetaForm as Form>::String,
) -> MessageSpecBuilder<
......@@ -521,6 +524,7 @@ impl IntoCompact for EventSpec {
impl EventSpec {
/// Creates a new event specification builder.
#[allow(clippy::new_ret_no_self)]
pub fn new(name: &'static str) -> EventSpecBuilder {
EventSpecBuilder {
spec: Self {
......@@ -669,6 +673,7 @@ impl IntoCompact for EventParamSpec {
impl EventParamSpec {
/// Creates a new event parameter specification builder.
#[allow(clippy::new_ret_no_self)]
pub fn new(name: &'static str) -> EventParamSpecBuilder {
EventParamSpecBuilder {
spec: Self {
......@@ -774,6 +779,7 @@ impl IntoCompact for MessageParamSpec {
impl MessageParamSpec {
/// Constructs a new message parameter specification via builder.
#[allow(clippy::new_ret_no_self)]
pub fn new(name: &'static str) -> MessageParamSpecBuilder {
MessageParamSpecBuilder {
spec: Self {
......@@ -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>
where
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