Skip to content

Commit 25a865b

Browse files
committed
fix: minor
1 parent db69240 commit 25a865b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

thoth-api/src/graphql/model.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ impl QueryRoot {
14691469

14701470
#[graphql(description = "Query a title by its ID")]
14711471
fn title(context: &Context, title_id: Uuid, markup_format: MarkupFormat) -> FieldResult<Title> {
1472-
let mut title = Title::from_id(&context.db, &title_id).map_err(|e| e.into())?;
1472+
let mut title = Title::from_id(&context.db, &title_id).map_err(|e| FieldError::from(e))?;
14731473
title.title = convert_from_jats(&title.title, markup_format)?;
14741474
if let Some(subtitle) = &title.subtitle {
14751475
title.subtitle = Some(convert_from_jats(subtitle, markup_format)?);
@@ -1513,7 +1513,7 @@ impl QueryRoot {
15131513
vec![],
15141514
None,
15151515
)
1516-
.map_err(FieldError::from)?;
1516+
.map_err(|e| FieldError::from(e))?;
15171517

15181518
for title in &mut titles {
15191519
title.title = convert_from_jats(&title.title, markup_format)?;

0 commit comments

Comments
 (0)