Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.87.0
- uses: dtolnay/rust-toolchain@1.89.0
- run: cargo build
- run: cargo test

Expand All @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.87.0
- uses: dtolnay/rust-toolchain@1.89.0
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
Expand Down
4 changes: 3 additions & 1 deletion src/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ impl ChunksExt for [Spanned<Chunk>] {

/// An iterator over the characters in each chunk, indicating whether they are
/// verbatim or not. Chunk types other than `Normal` or `Verbatim` are omitted.
pub(crate) fn chunk_chars(chunks: ChunksRef) -> impl Iterator<Item = (char, bool)> + '_ {
pub(crate) fn chunk_chars(
chunks: ChunksRef<'_>,
) -> impl Iterator<Item = (char, bool)> + '_ {
chunks.iter().flat_map(|chunk| {
let (s, verbatim) = chunk.v.get_and_verb();

Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,12 @@ impl Bibliography {
}

/// An iterator over the bibliography's entries.
pub fn iter(&self) -> std::slice::Iter<Entry> {
pub fn iter(&'_ self) -> std::slice::Iter<'_, Entry> {
self.entries.iter()
}

/// A mutable iterator over the bibliography's entries.
pub fn iter_mut(&mut self) -> std::slice::IterMut<Entry> {
pub fn iter_mut(&'_ mut self) -> std::slice::IterMut<'_, Entry> {
self.entries.iter_mut()
}

Expand Down Expand Up @@ -311,7 +311,7 @@ impl Entry {
/// Get the chunk slice of a field.
///
/// The field key must be lowercase.
pub fn get(&self, key: &str) -> Option<ChunksRef> {
pub fn get(&'_ self, key: &str) -> Option<ChunksRef<'_>> {
self.fields.get(key).map(AsRef::as_ref)
}

Expand Down Expand Up @@ -588,7 +588,7 @@ impl Entry {
}

/// Get an entry but return None for empty chunk slices.
fn get_non_empty(&self, key: &str) -> Option<ChunksRef> {
fn get_non_empty(&'_ self, key: &str) -> Option<ChunksRef<'_>> {
let entry = self.get(key)?;
if !entry.is_empty() {
Some(entry)
Expand Down
2 changes: 1 addition & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ macro_rules! fields {
})*
};

(@ret) => {ChunksRef};
(@ret) => {ChunksRef<'_>};
(@ret $ret:ty) => {$ret};

(@set $name:ident => $field:literal, ) => {
Expand Down
Loading