From d9c7a1e2addcadea871b8dcbf4de00c35f775685 Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Tue, 1 Oct 2024 17:20:29 +0200 Subject: [PATCH] Fix regression introduced in #174 --- src/interop.rs | 13 +++++++------ src/lib.rs | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/interop.rs b/src/interop.rs index 6f557c8..f5e5a06 100644 --- a/src/interop.rs +++ b/src/interop.rs @@ -279,13 +279,14 @@ impl TryFrom<&tex::Entry> for Entry { item.add_affiliated_persons((a, PersonRole::Introduction)); } - if let Some(title) = map_res(entry.title())?.map(Into::::into) { - if let Some(short_title) = - map_res(entry.short_title())?.map(Into::::into) - { - item.set_title(FormatString::with_short(title, short_title)); + if let Some(title) = map_res(entry.title())?.map(Into::into) { + if let Some(short_title) = map_res(entry.short_title())?.map(Into::into) { + item.set_title(FormatString { + value: title, + short: Some(Box::new(short_title)), + }); } else { - item.set_title(FormatString::with_value(title)); + item.set_title(FormatString { value: title, short: None }); } } diff --git a/src/lib.rs b/src/lib.rs index 565289c..27cf999 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,7 +63,7 @@ let result = driver.finish(BibliographyRequest { }); for cite in result.citations { - println!("{}", cite.citation.to_string()) + println!("{}", cite.citation) } ```