diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-14 17:35:58 +0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-14 17:35:58 +0800 |
commit | 9ca1bdfdba5de8191ad598ef0cc288eff4d50975 (patch) | |
tree | 47360fac06cf15b4233509c4c16fbf41e216ad0c /rust/src/api_helpers.rs | |
parent | aa7b96fd94bfe5d8f47b566cbb0f3a112c0ac755 (diff) | |
download | fatcat-9ca1bdfdba5de8191ad598ef0cc288eff4d50975.tar.gz fatcat-9ca1bdfdba5de8191ad598ef0cc288eff4d50975.zip |
new rustfmt (1.31)
Diffstat (limited to 'rust/src/api_helpers.rs')
-rw-r--r-- | rust/src/api_helpers.rs | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/rust/src/api_helpers.rs b/rust/src/api_helpers.rs index 952cb9cd..77377531 100644 --- a/rust/src/api_helpers.rs +++ b/rust/src/api_helpers.rs @@ -286,7 +286,8 @@ pub fn check_pmcid(raw: &str) -> Result<()> { Err(ErrorKind::MalformedExternalId(format!( "not a valid PubMed Central ID (PMCID): '{}' (expected, eg, 'PMC12345')", raw - )).into()) + )) + .into()) } } @@ -300,7 +301,8 @@ pub fn check_pmid(raw: &str) -> Result<()> { Err(ErrorKind::MalformedExternalId(format!( "not a valid PubMed ID (PMID): '{}' (expected, eg, '1234')", raw - )).into()) + )) + .into()) } } @@ -314,7 +316,8 @@ pub fn check_wikidata_qid(raw: &str) -> Result<()> { Err(ErrorKind::MalformedExternalId(format!( "not a valid Wikidata QID: '{}' (expected, eg, 'Q1234')", raw - )).into()) + )) + .into()) } } @@ -328,7 +331,8 @@ pub fn check_doi(raw: &str) -> Result<()> { Err(ErrorKind::MalformedExternalId(format!( "not a valid DOI: '{}' (expected, eg, '10.1234/aksjdfh')", raw - )).into()) + )) + .into()) } } @@ -342,7 +346,8 @@ pub fn check_issn(raw: &str) -> Result<()> { Err(ErrorKind::MalformedExternalId(format!( "not a valid ISSN: '{}' (expected, eg, '1234-5678')", raw - )).into()) + )) + .into()) } } @@ -356,7 +361,8 @@ pub fn check_orcid(raw: &str) -> Result<()> { Err(ErrorKind::MalformedExternalId(format!( "not a valid ORCID: '{}' (expected, eg, '0123-4567-3456-6789')", raw - )).into()) + )) + .into()) } } @@ -419,7 +425,8 @@ pub fn check_release_type(raw: &str) -> Result<()> { Err(ErrorKind::NotInControlledVocabulary(format!( "not a valid release_type: '{}' (expected a CSL type, eg, 'article-journal', 'book')", raw - )).into()) + )) + .into()) } #[test] @@ -460,7 +467,8 @@ pub fn check_contrib_role(raw: &str) -> Result<()> { Err(ErrorKind::NotInControlledVocabulary(format!( "not a valid contrib.role: '{}' (expected a CSL type, eg, 'author', 'editor')", raw - )).into()) + )) + .into()) } #[test] |