Explorar o código

ci: Fix clippy lints for Rust 1.9.0 (#4560)

Addresses violation of:
* clippy::derivable-impls.
* clippy::useless-vec
John Saigle hai 2 semanas
pai
achega
b4b14440c3

+ 1 - 1
cosmwasm/contracts/shutdown-wormhole/src/testing/integration.rs

@@ -149,7 +149,7 @@ pub fn guardian_set_update_allowed_in_shutdown() -> StdResult<()> {
         .wrap()
         .query_wasm_smart(wormhole_contract.clone(), &QueryMsg::GuardianSetInfo {})?;
 
-    let new_guardian_keys = vec![
+    let new_guardian_keys = [
         SigningKey::from_bytes(&[
             93, 217, 189, 224, 168, 81, 157, 93, 238, 38, 143, 8, 182, 94, 69, 77, 232, 199, 238,
             206, 15, 135, 221, 58, 43, 74, 0, 129, 54, 198, 62, 226,

+ 2 - 7
sdk/rust/supported-chains/src/lib.rs

@@ -5,10 +5,11 @@ use std::{fmt, str::FromStr};
 use serde::{Deserialize, Deserializer, Serialize, Serializer};
 use thiserror::Error;
 
-#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
 pub enum Chain {
     /// In the wormhole wire format, 0 indicates that a message is for any destination chain, it is
     /// represented here as `Any`.
+    #[default]
     Any,
 
     /// Chains
@@ -291,12 +292,6 @@ impl FromStr for Chain {
     }
 }
 
-impl Default for Chain {
-    fn default() -> Self {
-        Self::Any
-    }
-}
-
 impl Serialize for Chain {
     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
     where