signatures: Rename UnknownAlgorithm => UnsupportedAlgorithm
This commit is contained in:
parent
4c31b83543
commit
3f520bf907
@ -262,7 +262,7 @@ pub enum SplitError {
|
|||||||
#[error("malformed signature ID: expected version to contain only characters in the character set `[a-zA-Z0-9_]`, found `{0}`")]
|
#[error("malformed signature ID: expected version to contain only characters in the character set `[a-zA-Z0-9_]`, found `{0}`")]
|
||||||
InvalidVersion(String),
|
InvalidVersion(String),
|
||||||
|
|
||||||
/// The signature uses an unknown algorithm.
|
/// The signature uses an unsupported algorithm.
|
||||||
#[error("unknown algorithm: {0}")]
|
#[error("unsupported algorithm: {0}")]
|
||||||
UnknownAlgorithm(String),
|
UnsupportedAlgorithm(String),
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ fn split_id(id: &str) -> Result<(Algorithm, String), SplitError> {
|
|||||||
|
|
||||||
let algorithm = match algorithm_input {
|
let algorithm = match algorithm_input {
|
||||||
"ed25519" => Algorithm::Ed25519,
|
"ed25519" => Algorithm::Ed25519,
|
||||||
algorithm => return Err(SplitError::UnknownAlgorithm(algorithm.into())),
|
algorithm => return Err(SplitError::UnsupportedAlgorithm(algorithm.into())),
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok((algorithm, signature_id[1].to_owned()))
|
Ok((algorithm, signature_id[1].to_owned()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user