mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix 5 clippy warnings (#32808)
Signed-off-by: Rachael Gentry <rachael.l.gentry@gmail.com>
This commit is contained in:
parent
a6048c46d2
commit
8b3c9b744a
3 changed files with 5 additions and 6 deletions
|
@ -1000,7 +1000,7 @@ impl FlexLine<'_> {
|
||||||
let max_propagated_baseline = item_propagated_baselines
|
let max_propagated_baseline = item_propagated_baselines
|
||||||
.iter()
|
.iter()
|
||||||
.copied()
|
.copied()
|
||||||
.filter_map(|baseline| baseline)
|
.flatten()
|
||||||
.max()
|
.max()
|
||||||
.unwrap_or(Au::zero());
|
.unwrap_or(Au::zero());
|
||||||
let item_content_cross_start_posititons = self
|
let item_content_cross_start_posititons = self
|
||||||
|
|
|
@ -1360,8 +1360,7 @@ impl<'a, 'b> InlineFormattingContextState<'a, 'b> {
|
||||||
block: self
|
block: self
|
||||||
.current_line_max_block_size_including_nested_containers()
|
.current_line_max_block_size_including_nested_containers()
|
||||||
.max(&self.current_line_segment.max_block_size)
|
.max(&self.current_line_segment.max_block_size)
|
||||||
.resolve()
|
.resolve(),
|
||||||
.into(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
!self.new_potential_line_size_causes_line_break(&potential_line_size)
|
!self.new_potential_line_size_causes_line_break(&potential_line_size)
|
||||||
|
@ -2054,7 +2053,7 @@ impl IndependentFormattingContext {
|
||||||
|
|
||||||
let (block_sizes, baseline_offset_in_parent) = self.get_block_sizes_and_baseline_offset(
|
let (block_sizes, baseline_offset_in_parent) = self.get_block_sizes_and_baseline_offset(
|
||||||
inline_formatting_context_state,
|
inline_formatting_context_state,
|
||||||
size.block.into(),
|
size.block,
|
||||||
baseline_offset,
|
baseline_offset,
|
||||||
);
|
);
|
||||||
inline_formatting_context_state.update_unbreakable_segment_for_new_content(
|
inline_formatting_context_state.update_unbreakable_segment_for_new_content(
|
||||||
|
|
|
@ -589,10 +589,10 @@ impl ReplacedContent {
|
||||||
let size_from_maybe_clamped =
|
let size_from_maybe_clamped =
|
||||||
|(clamped_inline, clamped_block): (Option<Au>, Option<Au>)| {
|
|(clamped_inline, clamped_block): (Option<Au>, Option<Au>)| {
|
||||||
let clamped_inline = clamped_inline
|
let clamped_inline = clamped_inline
|
||||||
.map(|size| GenericLengthPercentageOrAuto::LengthPercentage(size))
|
.map(GenericLengthPercentageOrAuto::LengthPercentage)
|
||||||
.unwrap_or(box_size.inline);
|
.unwrap_or(box_size.inline);
|
||||||
let clamped_block = clamped_block
|
let clamped_block = clamped_block
|
||||||
.map(|size| GenericLengthPercentageOrAuto::LengthPercentage(size))
|
.map(GenericLengthPercentageOrAuto::LengthPercentage)
|
||||||
.unwrap_or(box_size.block);
|
.unwrap_or(box_size.block);
|
||||||
LogicalVec2 {
|
LogicalVec2 {
|
||||||
inline: clamped_inline,
|
inline: clamped_inline,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue