Fix clippy warnings
This commit is contained in:
parent
2b991129e3
commit
6c501c6640
9 changed files with 80 additions and 59 deletions
17
src/shape.rs
17
src/shape.rs
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue