Add explicit lifetimes to borrowed return types (#411)
This commit is contained in:
parent
a2f1f4b2a0
commit
f7033bb043
2 changed files with 5 additions and 5 deletions
|
|
@ -88,7 +88,7 @@ impl FamilyOwned {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn as_family(&self) -> Family {
|
||||
pub fn as_family(&self) -> Family<'_> {
|
||||
match self {
|
||||
Self::Name(name) => Family::Name(name),
|
||||
Self::Serif => Family::Serif,
|
||||
|
|
@ -388,7 +388,7 @@ impl AttrsOwned {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn as_attrs(&self) -> Attrs {
|
||||
pub fn as_attrs(&self) -> Attrs<'_> {
|
||||
Attrs {
|
||||
color_opt: self.color_opt,
|
||||
family: self.family_owned.as_family(),
|
||||
|
|
@ -422,7 +422,7 @@ impl AttrsList {
|
|||
}
|
||||
|
||||
/// Get the default [Attrs]
|
||||
pub fn defaults(&self) -> Attrs {
|
||||
pub fn defaults(&self) -> Attrs<'_> {
|
||||
self.defaults.as_attrs()
|
||||
}
|
||||
|
||||
|
|
@ -454,7 +454,7 @@ impl AttrsList {
|
|||
/// Get the attribute span for an index
|
||||
///
|
||||
/// This returns a span that contains the index
|
||||
pub fn get_span(&self, index: usize) -> Attrs {
|
||||
pub fn get_span(&self, index: usize) -> Attrs<'_> {
|
||||
self.spans
|
||||
.get(&index)
|
||||
.map(|v| v.as_attrs())
|
||||
|
|
|
|||
|
|
@ -864,7 +864,7 @@ impl Buffer {
|
|||
}
|
||||
|
||||
/// Get the visible layout runs for rendering and other tasks
|
||||
pub const fn layout_runs(&self) -> LayoutRunIter {
|
||||
pub fn layout_runs(&self) -> LayoutRunIter<'_> {
|
||||
LayoutRunIter::new(self)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue