mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-11 16:25:46 +00:00
Feat suppert procedural (#7913)
* fix clippy replace clone with copy * fix clippy warning pattern * fix clippy warning replace into_iter with iter * replace match with if let * replace =0 with is_empty * replace or with or_else * replace vec! with Vec::new
This commit is contained in:
@@ -27,7 +27,7 @@ use frame_support_procedural_tools::generate_crate_access_2018;
|
||||
/// The version is parsed into the requested destination type.
|
||||
fn get_version<T: FromStr>(version_env: &str) -> std::result::Result<T, ()> {
|
||||
let version = env::var(version_env)
|
||||
.expect(&format!("`{}` is always set by cargo; qed", version_env));
|
||||
.unwrap_or_else(|_| panic!("`{}` is always set by cargo; qed", version_env));
|
||||
|
||||
T::from_str(&version).map_err(drop)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user