From af33b9e50dbdbcd6a9dda6753eeaecaec36de452 Mon Sep 17 00:00:00 2001 From: DerDrodt Date: Wed, 2 Oct 2024 07:18:55 +0200 Subject: [PATCH] Apply requested changes --- src/lib.rs | 3 +-- src/types/mod.rs | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index fef85f6..e563aa4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -505,8 +505,7 @@ entry! { #[serde(serialize_with = "serialize_one_or_many_opt")] #[serde(deserialize_with = "deserialize_one_or_many_opt")] "affiliated" => affiliated: Vec | [PersonsWithRoles], - /// Publisher of the item. May be a string or a dictionary with `name` and - /// `location` (both strings). + /// Publisher of the item, which may have a name and a location. "publisher" => publisher: Publisher, /// Physical location at which the event took place. "location" => location: FormatString, diff --git a/src/types/mod.rs b/src/types/mod.rs index 091cf0f..ebabfd6 100644 --- a/src/types/mod.rs +++ b/src/types/mod.rs @@ -458,6 +458,7 @@ impl Publisher { impl FromStr for Publisher { type Err = ChunkedStrParseError; + /// Creates a new publisher with `s` as its name and no location. fn from_str(s: &str) -> Result { Ok(Publisher::new(Some(FormatString::from_str(s)?), None)) }