mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
clippy: Fix warnings in components/layout
(#31612)
* clippy: fix warnings in components/layout * fix: formatting
This commit is contained in:
parent
7f1ef4c7fe
commit
a6e25d555b
17 changed files with 129 additions and 150 deletions
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! Text layout.
|
||||
#![allow(clippy::too_many_arguments)]
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::LinkedList;
|
||||
|
@ -483,10 +484,10 @@ impl TextRunScanner {
|
|||
SpecificFragmentInfo::ScannedText(new_text_fragment_info),
|
||||
);
|
||||
|
||||
let is_last_mapping_of_this_old_fragment = match mappings.peek() {
|
||||
Some(mapping) if mapping.old_fragment_index == logical_offset => false,
|
||||
_ => true,
|
||||
};
|
||||
let is_last_mapping_of_this_old_fragment = !matches!(
|
||||
mappings.peek(),
|
||||
Some(mapping) if mapping.old_fragment_index == logical_offset
|
||||
);
|
||||
|
||||
if let Some(ref mut context) = new_fragment.inline_context {
|
||||
for node in &mut context.nodes {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue