Skip to content

Commit 8e4aa9c

Browse files
committed
fix(clippy): resolve needless_borrow and match_result_ok lint errors
1 parent df4689b commit 8e4aa9c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

core/src/composite_document_parser/format/citation.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,7 @@ pub(super) fn parse_csl_string(
225225
raw: &str,
226226
normalize_text: fn(&str) -> String,
227227
) -> Result<ParsedDocument> {
228-
let value: serde_json::Value =
229-
serde_json::from_str(&raw).context("failed to parse csl json")?;
228+
let value: serde_json::Value = serde_json::from_str(raw).context("failed to parse csl json")?;
230229

231230
let entries = match value {
232231
serde_json::Value::Array(items) => items,
@@ -514,7 +513,7 @@ fn citation_block(
514513
.with_ordinal(ordinal)
515514
.with_attribute("record_type", "citation")
516515
.with_attribute("citation_format", source);
517-
if let Some(payload) = serde_json::to_string(&fields).ok() {
516+
if let Ok(payload) = serde_json::to_string(&fields) {
518517
block = block.with_structured_payload(payload);
519518
}
520519
block

0 commit comments

Comments
 (0)