Skip to content

Commit

Permalink
Remove unnecesary clone
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Apr 16, 2024
1 parent c8b09b5 commit e8c4126
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions thoth-export-server/src/marc21/marc21record_thoth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,17 +638,15 @@ impl Marc21Field<Marc21RecordThoth> for WorkIssues {
self.series
.issn_digital
.as_ref()
.map_or(Ok(f.clone()), |issn_digital| {
f.add_subfield(b"x", issn_digital.as_bytes())
})
.map(|issn_digital| f.add_subfield(b"x", issn_digital.as_bytes()))
.unwrap_or(Ok(f))
})
.and_then(|f| {
self.series
.issn_print
.as_ref()
.map_or(Ok(f.clone()), |issn_print| {
f.add_subfield(b"x", issn_print.as_bytes())
})
.map(|issn_print| f.add_subfield(b"x", issn_print.as_bytes()))
.unwrap_or(Ok(f))
})
.and_then(|f| builder.add_field(f))?;
}
Expand Down

0 comments on commit e8c4126

Please sign in to comment.