Fix clippy warnings

This commit is contained in:
Edgar Geier 2023-02-28 19:42:53 +01:00
parent 2b991129e3
commit 6c501c6640
No known key found for this signature in database
GPG key ID: 7A65B51FD6B75EF5
9 changed files with 80 additions and 59 deletions

View file

@ -98,8 +98,8 @@ fn shape_fallback(
(glyphs, missing)
}
fn shape_run<'a>(
font_system: &'a FontSystem,
fn shape_run(
font_system: &FontSystem,
line: &str,
attrs_list: &AttrsList,
start_run: usize,
@ -278,8 +278,8 @@ pub struct ShapeWord {
}
impl ShapeWord {
pub fn new<'a>(
font_system: &'a FontSystem,
pub fn new(
font_system: &FontSystem,
line: &str,
attrs_list: &AttrsList,
word_range: Range<usize>,
@ -352,8 +352,8 @@ pub struct ShapeSpan {
}
impl ShapeSpan {
pub fn new<'a>(
font_system: &'a FontSystem,
pub fn new(
font_system: &FontSystem,
line: &str,
attrs_list: &AttrsList,
span_range: Range<usize>,
@ -434,7 +434,10 @@ pub struct ShapeLine {
type VlRange = (usize, (usize, usize), (usize, usize));
impl ShapeLine {
pub fn new<'a>(font_system: &'a FontSystem, line: &str, attrs_list: &AttrsList) -> Self {
/// # Panics
///
/// Will panic if `line` contains more than one paragraph.
pub fn new(font_system: &FontSystem, line: &str, attrs_list: &AttrsList) -> Self {
let mut spans = Vec::new();
let bidi = unicode_bidi::BidiInfo::new(line, None);