diff --git a/examples/1_advanced/6_domain_linkage.rs b/examples/1_advanced/6_domain_linkage.rs index a77bc3c5b0..6e7a629110 100644 --- a/examples/1_advanced/6_domain_linkage.rs +++ b/examples/1_advanced/6_domain_linkage.rs @@ -180,12 +180,12 @@ async fn main() -> anyhow::Result<()> { // Get the domains included in the Linked Domain Service. let domains: &[Url] = linked_domain_services - .get(0) + .first() .ok_or_else(|| anyhow::anyhow!("expected a domain"))? .domains(); let domain_foo: Url = domains - .get(0) + .first() .ok_or_else(|| anyhow::anyhow!("expected a domain"))? .clone(); assert_eq!(domain_foo, domain_1); diff --git a/identity_document/src/document/core_document.rs b/identity_document/src/document/core_document.rs index b079111ed4..87fddd0fed 100644 --- a/identity_document/src/document/core_document.rs +++ b/identity_document/src/document/core_document.rs @@ -1153,7 +1153,7 @@ mod tests { let document: CoreDocument = document(); // Access methods by index. - assert_eq!(document.methods(None).get(0).unwrap().id().to_string(), "did:example:1234#key-1"); + assert_eq!(document.methods(None).first().unwrap().id().to_string(), "did:example:1234#key-1"); assert_eq!(document.methods(None).get(2).unwrap().id().to_string(), "did:example:1234#key-3"); } @@ -1164,7 +1164,7 @@ mod tests { // VerificationMethod let verification_methods: Vec<&VerificationMethod> = document.methods(Some(MethodScope::VerificationMethod)); assert_eq!( - verification_methods.get(0).unwrap().id().to_string(), + verification_methods.first().unwrap().id().to_string(), "did:example:1234#key-1" ); assert_eq!( @@ -1180,7 +1180,7 @@ mod tests { // Authentication let authentication: Vec<&VerificationMethod> = document.methods(Some(MethodScope::authentication())); assert_eq!( - authentication.get(0).unwrap().id().to_string(), + authentication.first().unwrap().id().to_string(), "did:example:1234#auth-key" ); assert_eq!( diff --git a/identity_storage/src/key_storage/memstore.rs b/identity_storage/src/key_storage/memstore.rs index 7dd92fc3c2..f101af4759 100644 --- a/identity_storage/src/key_storage/memstore.rs +++ b/identity_storage/src/key_storage/memstore.rs @@ -186,7 +186,7 @@ enum MemStoreKeyType { } impl JwkMemStore { - const ED25519_KEY_TYPE_STR: &str = "Ed25519"; + const ED25519_KEY_TYPE_STR: &'static str = "Ed25519"; /// The Ed25519 key type. pub const ED25519_KEY_TYPE: KeyType = KeyType::from_static_str(Self::ED25519_KEY_TYPE_STR); } diff --git a/identity_stronghold/src/lib.rs b/identity_stronghold/src/lib.rs index a5cfc8b475..decb2c4c00 100644 --- a/identity_stronghold/src/lib.rs +++ b/identity_stronghold/src/lib.rs @@ -8,4 +8,3 @@ mod stronghold_key_id; mod tests; pub use stronghold_jwk_storage::*; -pub use stronghold_key_id::*;