diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2020-12-02 10:48:14 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2020-12-17 23:03:08 -0800 |
commit | c29183a78cb13d507b44bc57d392beae89250339 (patch) | |
tree | 1656a63df7d997be9e10456e01876eb33bec7fa9 /rust | |
parent | 5a139a680a40a9628cd4c0116226f7c9ae470572 (diff) | |
download | fatcat-c29183a78cb13d507b44bc57d392beae89250339.tar.gz fatcat-c29183a78cb13d507b44bc57d392beae89250339.zip |
rust: fix malformed ext id error type
This bug was due to copy/paste of SHA-1 check
Diffstat (limited to 'rust')
-rw-r--r-- | rust/src/identifiers.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/identifiers.rs b/rust/src/identifiers.rs index 9d766417..9d3734c9 100644 --- a/rust/src/identifiers.rs +++ b/rust/src/identifiers.rs @@ -369,7 +369,7 @@ pub fn check_doaj_id(raw: &str) -> Result<()> { if raw.is_ascii() && RE.is_match(raw) { Ok(()) } else { - Err(FatcatError::MalformedChecksum( + Err(FatcatError::MalformedExternalId( "DOAJ Article Identifier (expected, eg, 'e58f08a11ecb495ead55a44ad4f89808')" .to_string(), raw.to_string(), @@ -427,7 +427,7 @@ pub fn check_oai_id(raw: &str) -> Result<()> { if raw.is_ascii() && RE.is_match(raw) { Ok(()) } else { - Err(FatcatError::MalformedChecksum( + Err(FatcatError::MalformedExternalId( "OAI-PMH identifier (expected, eg, 'oai:foo.org:some-local-id-54')".to_string(), raw.to_string(), ))? |