Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
UMR1352 committed Feb 19, 2024
1 parent 6f87255 commit 28b90cd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/1_advanced/6_domain_linkage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions identity_document/src/document/core_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand All @@ -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!(
Expand All @@ -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!(
Expand Down
2 changes: 1 addition & 1 deletion identity_storage/src/key_storage/memstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion identity_stronghold/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ mod stronghold_key_id;
mod tests;

pub use stronghold_jwk_storage::*;
pub use stronghold_key_id::*;

0 comments on commit 28b90cd

Please sign in to comment.