mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
clippy: components/canvas/canvas_data.rs (#32843)
Signed-off-by: Rémy Saissy <remy.saissy@gmail.com>
This commit is contained in:
parent
1906741704
commit
7ace7b43dc
1 changed files with 3 additions and 3 deletions
|
@ -251,7 +251,7 @@ impl<'a> UnshapedTextRun<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn to_shaped_text_run(self) -> Option<TextRun> {
|
fn into_shaped_text_run(self) -> Option<TextRun> {
|
||||||
let font = self.font?;
|
let font = self.font?;
|
||||||
if self.string.is_empty() {
|
if self.string.is_empty() {
|
||||||
return None;
|
return None;
|
||||||
|
@ -552,7 +552,7 @@ impl<'a> CanvasData<'a> {
|
||||||
// to be some alignment along a baseline and also support for bidi text.
|
// to be some alignment along a baseline and also support for bidi text.
|
||||||
let shaped_runs: Vec<_> = runs
|
let shaped_runs: Vec<_> = runs
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(UnshapedTextRun::to_shaped_text_run)
|
.filter_map(UnshapedTextRun::into_shaped_text_run)
|
||||||
.collect();
|
.collect();
|
||||||
let total_advance = shaped_runs
|
let total_advance = shaped_runs
|
||||||
.iter()
|
.iter()
|
||||||
|
@ -635,7 +635,7 @@ impl<'a> CanvasData<'a> {
|
||||||
|
|
||||||
let shaped_runs: Vec<_> = runs
|
let shaped_runs: Vec<_> = runs
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(UnshapedTextRun::to_shaped_text_run)
|
.filter_map(UnshapedTextRun::into_shaped_text_run)
|
||||||
.collect();
|
.collect();
|
||||||
let total_advance = shaped_runs
|
let total_advance = shaped_runs
|
||||||
.iter()
|
.iter()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue