diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-06-12 16:43:49 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-06-12 16:47:46 +0200 |
| commit | d3b4d7da9a801dac3af6a3cf52eb55af83adc5f5 (patch) | |
| tree | 72ab79ed75dddfb7b97ddf02ba4d19c4efc9ea5a /library/src/meta | |
| parent | 378ebe5f5601f11c3f428c17bed492012feb251e (diff) | |
More `bail!` usage
Diffstat (limited to 'library/src/meta')
| -rw-r--r-- | library/src/meta/bibliography.rs | 2 | ||||
| -rw-r--r-- | library/src/meta/numbering.rs | 2 | ||||
| -rw-r--r-- | library/src/meta/outline.rs | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/library/src/meta/bibliography.rs b/library/src/meta/bibliography.rs index f020f730..661257b4 100644 --- a/library/src/meta/bibliography.rs +++ b/library/src/meta/bibliography.rs @@ -633,7 +633,7 @@ fn parse_bib(path_str: &str, src: &str) -> StrResult<Vec<hayagriva::Entry>> { .map(|error| format_biblatex_error(path_str, src, error)) .unwrap_or_else(|| eco_format!("failed to parse {path_str}")) }), - _ => Err("unknown bibliography format (must be .yml/.yaml or .bib)".into()), + _ => bail!("unknown bibliography format (must be .yml/.yaml or .bib)"), } } diff --git a/library/src/meta/numbering.rs b/library/src/meta/numbering.rs index 08d35458..ed71c1be 100644 --- a/library/src/meta/numbering.rs +++ b/library/src/meta/numbering.rs @@ -218,7 +218,7 @@ impl FromStr for NumberingPattern { let suffix = pattern[handled..].into(); if pieces.is_empty() { - Err("invalid numbering pattern")?; + return Err("invalid numbering pattern"); } Ok(Self { pieces, suffix, trimmed: false }) diff --git a/library/src/meta/outline.rs b/library/src/meta/outline.rs index 3ba1b2e5..b78cd765 100644 --- a/library/src/meta/outline.rs +++ b/library/src/meta/outline.rs @@ -407,9 +407,8 @@ cast! { /// == Setup /// ``` /// -/// To completely customize an entry's line, you can also build it from -/// scratch by accessing the `level`, `element`, `outline`, and `fill` -/// fields on the entry. +/// To completely customize an entry's line, you can also build it from scratch +/// by accessing the `level`, `element`, `body`, and `fill` fields on the entry. /// /// Display: Outline Entry /// Category: meta |
