Skip to content

Commit fd531bc

Browse files
committed
Don't elide lifetimes.
1 parent 0f195ea commit fd531bc

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

plotters-backend/src/text.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ pub trait BackendTextStyle {
217217
text_anchor::Pos::default()
218218
}
219219

220-
fn family(&self) -> FontFamily;
220+
fn family(&self) -> FontFamily<'_>;
221221

222222
#[allow(clippy::type_complexity)]
223223
fn layout_box(&self, text: &str) -> Result<((i32, i32), (i32, i32)), Self::FontError>;

plotters-bitmap/src/bitmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl<'a, P: PixelFormat> BitMapBackend<'a, P> {
142142
///
143143
/// - `area_size`: The size of the area
144144
/// - **returns**: The split backends that can be rendered in parallel
145-
pub fn split(&mut self, area_size: &[u32]) -> Vec<BitMapBackend<P>> {
145+
pub fn split(&mut self, area_size: &[u32]) -> Vec<BitMapBackend<'_, P>> {
146146
let (w, h) = self.get_size();
147147
let buf = self.get_raw_pixel_buffer();
148148

plotters/src/element/image.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl<'a, Coord, P: PixelFormat> BitMapElement<'a, Coord, P> {
147147
/// Copy the existing bitmap element to another location
148148
///
149149
/// - `pos`: The new location to copy
150-
pub fn copy_to<Coord2>(&self, pos: Coord2) -> BitMapElement<Coord2, P> {
150+
pub fn copy_to<Coord2>(&self, pos: Coord2) -> BitMapElement<'_, Coord2, P> {
151151
BitMapElement {
152152
image: Buffer::Borrowed(self.image.borrow()),
153153
size: self.size,
@@ -165,7 +165,7 @@ impl<'a, Coord, P: PixelFormat> BitMapElement<'a, Coord, P> {
165165

166166
/// Make the bitmap element as a bitmap backend, so that we can use
167167
/// plotters drawing functionality on the bitmap element
168-
pub fn as_bitmap_backend(&mut self) -> BitMapBackend<P> {
168+
pub fn as_bitmap_backend(&mut self) -> BitMapBackend<'_, P> {
169169
BitMapBackend::with_buffer_and_format(self.image.to_mut(), self.size).unwrap()
170170
}
171171
}

plotters/src/style/font/font_desc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl<'a> FontDesc<'a> {
118118
}
119119

120120
/// Returns the font family
121-
pub fn get_family(&self) -> FontFamily {
121+
pub fn get_family(&self) -> FontFamily<'_> {
122122
self.family
123123
}
124124

plotters/src/style/text.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ impl<'a> BackendTextStyle for TextStyle<'a> {
308308
self.pos
309309
}
310310

311-
fn family(&self) -> FontFamily {
311+
fn family(&self) -> FontFamily<'_> {
312312
self.font.get_family()
313313
}
314314

0 commit comments

Comments
 (0)