Skip to content

Commit

Permalink
use iotaledger/did_url_parser
Browse files Browse the repository at this point in the history
  • Loading branch information
UMR1352 committed Mar 27, 2024
1 parent b424d3d commit 335c31d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion identity_did/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository.workspace = true
description = "Agnostic implementation of the Decentralized Identifiers (DID) standard."

[dependencies]
did_url = { git = "https://github.com/iotaledger/did_url.git", features = ["std", "serde"] }
did_url_parser = { version = "0.2.0", features = ["std", "serde"] }
form_urlencoded = { version = "1.2.0", default-features = false, features = ["alloc"] }
identity_core = { version = "=1.1.1", path = "../identity_core" }
serde.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion identity_did/src/did.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use core::fmt::Formatter;
use core::str::FromStr;
use std::hash::Hash;

use did_url::DID as BaseDIDUrl;
use did_url_parser::DID as BaseDIDUrl;

use identity_core::common::KeyComparable;

Expand Down
2 changes: 1 addition & 1 deletion identity_did/src/did_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::cmp::Ordering;
use std::hash::Hash;
use std::hash::Hasher;

use did_url::DID as BaseDIDUrl;
use did_url_parser::DID as BaseDIDUrl;

use identity_core::common::KeyComparable;
use identity_core::common::Url;
Expand Down
16 changes: 8 additions & 8 deletions identity_did/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ pub enum Error {
Other(&'static str),
}

impl From<did_url::Error> for Error {
fn from(error: did_url::Error) -> Self {
impl From<did_url_parser::Error> for Error {
fn from(error: did_url_parser::Error) -> Self {
match error {
did_url::Error::InvalidFragment => Self::InvalidFragment,
did_url::Error::InvalidMethodId => Self::InvalidMethodId,
did_url::Error::InvalidMethodName => Self::InvalidMethodName,
did_url::Error::InvalidPath => Self::InvalidPath,
did_url::Error::InvalidQuery => Self::InvalidQuery,
did_url::Error::InvalidScheme => Self::InvalidScheme,
did_url_parser::Error::InvalidFragment => Self::InvalidFragment,
did_url_parser::Error::InvalidMethodId => Self::InvalidMethodId,
did_url_parser::Error::InvalidMethodName => Self::InvalidMethodName,
did_url_parser::Error::InvalidPath => Self::InvalidPath,
did_url_parser::Error::InvalidQuery => Self::InvalidQuery,
did_url_parser::Error::InvalidScheme => Self::InvalidScheme,
error => Self::Other(error.as_str()),
}
}
Expand Down
2 changes: 1 addition & 1 deletion identity_did/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mod error;

pub use crate::did_url::DIDUrl;
pub use crate::did_url::RelativeDIDUrl;
pub use ::did_url::DID as BaseDIDUrl;
pub use ::did_url_parser::DID as BaseDIDUrl;
pub use did::CoreDID;
pub use did::DID;
pub use error::Error;
2 changes: 1 addition & 1 deletion identity_document/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rust-version.workspace = true
description = "Method-agnostic implementation of the Decentralized Identifiers (DID) standard."

[dependencies]
did_url = { git = "https://github.com/iotaledger/did_url.git", features = ["std", "serde"] }
did_url_parser = { version = "0.2.0", features = ["std", "serde"] }
identity_core = { version = "=1.1.1", path = "../identity_core" }
identity_did = { version = "=1.1.1", path = "../identity_did" }
identity_verification = { version = "=1.1.1", path = "../identity_verification", default-features = false }
Expand Down

0 comments on commit 335c31d

Please sign in to comment.