diff --git a/thoth-api/src/graphql/model.rs b/thoth-api/src/graphql/model.rs index 3e590138..5afc51f1 100644 --- a/thoth-api/src/graphql/model.rs +++ b/thoth-api/src/graphql/model.rs @@ -3040,10 +3040,13 @@ impl Imprint { self.imprint_url.as_ref() } - #[graphql(description = "DOI of the imprint's Crossmark policy page, if publisher participates. Crossmark 'gives readers quick and easy access to the current status of an item of content, including any corrections, retractions, or updates'. More: https://www.crossref.org/services/crossmark/")] + #[graphql( + description = "DOI of the imprint's Crossmark policy page, if publisher participates. Crossmark 'gives readers quick and easy access to the + current status of an item of content, including any corrections, retractions, or updates'. More: https://www.crossref.org/services/crossmark/" + )] pub fn crossmark_doi(&self) -> Option<&Doi> { - self.crossmark_doi.as_ref() - } + self.crossmark_doi.as_ref() + } pub fn created_at(&self) -> Timestamp { self.created_at.clone() diff --git a/thoth-api/src/model/imprint/mod.rs b/thoth-api/src/model/imprint/mod.rs index 21b60d99..ceb1ad4d 100644 --- a/thoth-api/src/model/imprint/mod.rs +++ b/thoth-api/src/model/imprint/mod.rs @@ -1,9 +1,9 @@ +use crate::model::Doi; use serde::Deserialize; use serde::Serialize; use strum::Display; use strum::EnumString; use uuid::Uuid; -use crate::model::Doi; use crate::graphql::utils::Direction; use crate::model::publisher::Publisher; @@ -146,8 +146,8 @@ fn test_imprintfield_fromstr() { ImprintField::ImprintUrl ); assert_eq!( - ImprintField::from_str("CrossmarkDOI").unwrap(), - ImprintField::CrossmarkDoi + ImprintField::from_str("CrossmarkDOI").unwrap(), + ImprintField::CrossmarkDoi ); assert_eq!( ImprintField::from_str("CreatedAt").unwrap(), diff --git a/thoth-export-server/src/xml/onix3_thoth.rs b/thoth-export-server/src/xml/onix3_thoth.rs index aa68f0b2..beaa363c 100644 --- a/thoth-export-server/src/xml/onix3_thoth.rs +++ b/thoth-export-server/src/xml/onix3_thoth.rs @@ -2091,6 +2091,7 @@ mod tests { imprint: WorkImprint { imprint_name: "OA Editions Imprint".to_string(), imprint_url: Some("https://imprint.oa".to_string()), + crossmark_doi: None, publisher: WorkImprintPublisher { publisher_name: "OA Editions".to_string(), publisher_shortname: None,