Fix mismatched-lifetime-syntaxes clippy warnings (#451)

This commit is contained in:
Leonard Hecker 2025-06-10 00:47:45 +02:00 committed by GitHub
parent 5c5471e944
commit 72fb5f1336
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View file

@ -45,4 +45,4 @@ jobs:
- name: Run tests
run: cargo test --all-features --all-targets
- name: Run clippy
run: cargo clippy --all-features --all-targets -- --deny warnings
run: cargo clippy --all-features --all-targets -- --no-deps --deny warnings

View file

@ -1202,7 +1202,7 @@ impl TextBuffer {
};
}
fn measurement_config(&self) -> MeasurementConfig {
fn measurement_config(&self) -> MeasurementConfig<'_> {
MeasurementConfig::new(&self.buffer)
.with_word_wrap_column(self.word_wrap_column)
.with_tab_size(self.tab_size)

View file

@ -795,7 +795,7 @@ impl Bitmap {
}
/// Iterates over each row in the bitmap.
fn iter(&self) -> ChunksExact<u32> {
fn iter(&self) -> ChunksExact<'_, u32> {
self.data.chunks_exact(self.size.width as usize)
}
}
@ -881,7 +881,7 @@ impl AttributeBuffer {
}
/// Iterates over each row in the bitmap.
fn iter(&self) -> ChunksExact<Attributes> {
fn iter(&self) -> ChunksExact<'_, Attributes> {
self.data.chunks_exact(self.size.width as usize)
}
}

View file

@ -582,7 +582,7 @@ pub fn load_libicui18n() -> apperr::Result<NonNull<c_void>> {
}
/// Returns a list of preferred languages for the current user.
pub fn preferred_languages(arena: &Arena) -> Vec<ArenaString, &Arena> {
pub fn preferred_languages(arena: &Arena) -> Vec<ArenaString<'_>, &Arena> {
// If the GetUserPreferredUILanguages() don't fit into 512 characters,
// honestly, just give up. How many languages do you realistically need?
const LEN: usize = 512;