Commit 9393a7e5 authored by Qinxuan Chen's avatar Qinxuan Chen

Format

Signed-off-by: Qinxuan Chen's avatarkoushiro <koushiro.cqx@gmail.com>
parent 09ca5313
Pipeline #55923 failed with stages
in 26 seconds
...@@ -219,7 +219,7 @@ impl Contract { ...@@ -219,7 +219,7 @@ impl Contract {
if method.sig.ident == "deploy" { if method.sig.ident == "deploy" {
bail!( bail!(
method.sig.ident, method.sig.ident,
"contract methods must not be named `deploy`" "contract methods must not be named `deploy`",
); );
} }
} }
...@@ -227,7 +227,7 @@ impl Contract { ...@@ -227,7 +227,7 @@ impl Contract {
if msg.sig.ident == "deploy" { if msg.sig.ident == "deploy" {
bail!( bail!(
msg.sig.ident, msg.sig.ident,
"contract messages must not be named `deploy`" "contract messages must not be named `deploy`",
); );
} }
let inputs = &msg.sig.inputs; let inputs = &msg.sig.inputs;
...@@ -236,7 +236,7 @@ impl Contract { ...@@ -236,7 +236,7 @@ impl Contract {
None => { None => {
bail!( bail!(
msg.sig.ident, msg.sig.ident,
"contract messages must operate on `&self` or `&mut self`" "contract messages must operate on `&self` or `&mut self`",
); );
} }
Some(self_ty) => { Some(self_ty) => {
...@@ -254,7 +254,7 @@ impl Contract { ...@@ -254,7 +254,7 @@ impl Contract {
_ => { _ => {
bail!( bail!(
self_ty, self_ty,
"contract messages must operate on `&self` or `&mut self`" "contract messages must operate on `&self` or `&mut self`",
); );
} }
} }
...@@ -267,7 +267,7 @@ impl Contract { ...@@ -267,7 +267,7 @@ impl Contract {
if pat_ident.ident == "env" { if pat_ident.ident == "env" {
bail!( bail!(
pat_ident.ident, pat_ident.ident,
"contract messages must not contain an argument called `env`" "contract messages must not contain an argument called `env`",
); );
} }
} }
...@@ -328,8 +328,8 @@ impl Contract { ...@@ -328,8 +328,8 @@ impl Contract {
_ => { _ => {
bail!( bail!(
self_ty, self_ty,
"the deploy implementation must operate on `&mut self`" "the deploy implementation must operate on `&mut self`",
) );
} }
} }
...@@ -339,7 +339,7 @@ impl Contract { ...@@ -339,7 +339,7 @@ impl Contract {
if pat_ident.ident == "env" { if pat_ident.ident == "env" {
bail!( bail!(
pat_ident.ident, pat_ident.ident,
"the deploy implementation must not contain an argument named `env`" "the deploy implementation must not contain an argument named `env`",
); );
} }
} }
...@@ -348,13 +348,13 @@ impl Contract { ...@@ -348,13 +348,13 @@ impl Contract {
if sig.generics != Default::default() { if sig.generics != Default::default() {
bail!( bail!(
sig.generics, sig.generics,
"the deploy implementation must not be generic" "the deploy implementation must not be generic",
); );
} }
if sig.output != syn::ReturnType::Default { if sig.output != syn::ReturnType::Default {
bail!( bail!(
sig.output, sig.output,
"the deploy implementation must not have a return type" "the deploy implementation must not have a return type",
); );
} }
......
...@@ -178,7 +178,7 @@ impl TryFrom<&syn::TypePath> for ResultTypeDescription { ...@@ -178,7 +178,7 @@ impl TryFrom<&syn::TypePath> for ResultTypeDescription {
if generic_args.args.len() != 2 { if generic_args.args.len() != 2 {
bail!( bail!(
generic_args, generic_args,
"`Result` type requires 2 generic type arguments" "`Result` type requires 2 generic type arguments",
); );
} }
let ok_type = match &generic_args.args[0] { let ok_type = match &generic_args.args[0] {
...@@ -229,7 +229,7 @@ impl TryFrom<&syn::Type> for TypeDescription { ...@@ -229,7 +229,7 @@ impl TryFrom<&syn::Type> for TypeDescription {
} }
} }
} }
invalid => bail!(invalid, "invalid or unsupported type",), invalid => bail!(invalid, "invalid or unsupported type"),
} }
} }
} }
......
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