Update to 2024 edition (#2001)

* Update to 2024 edition

* Update to 2024 edition; fmt, use<> and remove refs

* async functions
This commit is contained in:
James Wilson
2025-05-09 16:12:18 +01:00
committed by GitHub
parent 98c1d153b6
commit 23c62f3d5d
120 changed files with 399 additions and 322 deletions
+5 -3
View File
@@ -20,8 +20,8 @@ use api::RuntimeGenerator;
use proc_macro2::TokenStream as TokenStream2;
use scale_typegen::typegen::settings::AllocCratePath;
use scale_typegen::{
typegen::settings::substitutes::absolute_path, DerivesRegistry, TypeGeneratorSettings,
TypeSubstitutes, TypegenError,
DerivesRegistry, TypeGeneratorSettings, TypeSubstitutes, TypegenError,
typegen::settings::substitutes::absolute_path,
};
use std::collections::HashMap;
use syn::parse_quote;
@@ -225,7 +225,9 @@ impl CodegenBuilder {
if absolute_path(crate_path.clone()).is_err() {
// Throw an error here, because otherwise we end up with a harder to comprehend error when
// substitute types don't begin with an absolute path.
panic!("The provided crate path must be an absolute path, ie prefixed with '::' or 'crate'");
panic!(
"The provided crate path must be an absolute path, ie prefixed with '::' or 'crate'"
);
}
self.crate_path = crate_path;
}