From c29183a78cb13d507b44bc57d392beae89250339 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 2 Dec 2020 10:48:14 -0800 Subject: rust: fix malformed ext id error type This bug was due to copy/paste of SHA-1 check --- rust/src/identifiers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust') 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(), ))? -- cgit v1.2.3