mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
ci: add quick-check with rustfmt (#615)
* ci: add quick-check with clippy and rustfmt * chore: rustfmt round * chore: set the same rustfmt config than substrate * chore: fix formatting * cI: remove clippy * ci: switch to nightly for the checks * ci: fix toolchains and naming * ci: Limit the check to formatting * chore: fix formatting * Update .rustfmt.toml * Update .rustfmt.toml Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -69,13 +69,13 @@ impl Parse for Input {
|
||||
} else if lookahead.peek(keywords::CheckInherents) {
|
||||
parse_inner::<keywords::CheckInherents>(input, &mut check_inherents)?;
|
||||
} else {
|
||||
return Err(lookahead.error());
|
||||
return Err(lookahead.error())
|
||||
}
|
||||
}
|
||||
|
||||
let rest = input.parse::<TokenStream>()?;
|
||||
if !rest.is_empty() {
|
||||
return Err(Error::new(rest.span(), "Unexpected input data"));
|
||||
return Err(Error::new(rest.span(), "Unexpected input data"))
|
||||
}
|
||||
|
||||
Ok(Self {
|
||||
@@ -88,10 +88,8 @@ impl Parse for Input {
|
||||
|
||||
fn crate_() -> Result<Ident, Error> {
|
||||
match crate_name("cumulus-pallet-parachain-system") {
|
||||
Ok(FoundCrate::Itself) => Ok(syn::Ident::new(
|
||||
"cumulus_pallet_parachain_system",
|
||||
Span::call_site(),
|
||||
)),
|
||||
Ok(FoundCrate::Itself) =>
|
||||
Ok(syn::Ident::new("cumulus_pallet_parachain_system", Span::call_site())),
|
||||
Ok(FoundCrate::Name(name)) => Ok(Ident::new(&name, Span::call_site())),
|
||||
Err(e) => Err(Error::new(Span::call_site(), e)),
|
||||
}
|
||||
@@ -99,11 +97,7 @@ fn crate_() -> Result<Ident, Error> {
|
||||
|
||||
#[proc_macro]
|
||||
pub fn register_validate_block(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
||||
let Input {
|
||||
runtime,
|
||||
check_inherents,
|
||||
block_executor,
|
||||
} = match syn::parse(input) {
|
||||
let Input { runtime, check_inherents, block_executor } = match syn::parse(input) {
|
||||
Ok(t) => t,
|
||||
Err(e) => return e.into_compile_error().into(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user