mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix issues found by rust-clippy
This commit is contained in:
parent
6303126e0c
commit
20beaf5af3
23 changed files with 106 additions and 121 deletions
|
@ -1479,7 +1479,7 @@ impl Fragment {
|
|||
let character_breaking_strategy =
|
||||
text_fragment_info.run.character_slices_in_range(&text_fragment_info.range);
|
||||
flags.remove(RETRY_AT_CHARACTER_BOUNDARIES);
|
||||
return self.calculate_split_position_using_breaking_strategy(
|
||||
self.calculate_split_position_using_breaking_strategy(
|
||||
character_breaking_strategy,
|
||||
max_inline_size,
|
||||
flags)
|
||||
|
@ -1685,7 +1685,7 @@ impl Fragment {
|
|||
|
||||
/// Assigns replaced inline-size, padding, and margins for this fragment only if it is replaced
|
||||
/// content per CSS 2.1 § 10.3.2.
|
||||
pub fn assign_replaced_inline_size_if_necessary<'a>(&'a mut self, container_inline_size: Au) {
|
||||
pub fn assign_replaced_inline_size_if_necessary(&mut self, container_inline_size: Au) {
|
||||
match self.specific {
|
||||
SpecificFragmentInfo::Generic |
|
||||
SpecificFragmentInfo::GeneratedContent(_) |
|
||||
|
@ -2257,7 +2257,7 @@ impl Fragment {
|
|||
CharIndex(leading_whitespace_character_count),
|
||||
-CharIndex(leading_whitespace_character_count));
|
||||
|
||||
return WhitespaceStrippingResult::RetainFragment
|
||||
WhitespaceStrippingResult::RetainFragment
|
||||
}
|
||||
SpecificFragmentInfo::UnscannedText(ref mut unscanned_text_fragment_info) => {
|
||||
let mut new_text_string = String::new();
|
||||
|
|
|
@ -184,11 +184,11 @@ impl<'a,'b> ResolveGeneratedContentFragmentMutator<'a,'b> {
|
|||
}
|
||||
GeneratedContentInfo::ContentItem(ContentItem::Counter(ref counter_name,
|
||||
counter_style)) => {
|
||||
let mut temporary_counter = Counter::new();
|
||||
let temporary_counter = Counter::new();
|
||||
let counter = self.traversal
|
||||
.counters
|
||||
.get(&*counter_name)
|
||||
.unwrap_or(&mut temporary_counter);
|
||||
.unwrap_or(&temporary_counter);
|
||||
new_info = counter.render(self.traversal.layout_context,
|
||||
fragment.node,
|
||||
fragment.pseudo.clone(),
|
||||
|
@ -199,11 +199,11 @@ impl<'a,'b> ResolveGeneratedContentFragmentMutator<'a,'b> {
|
|||
GeneratedContentInfo::ContentItem(ContentItem::Counters(ref counter_name,
|
||||
ref separator,
|
||||
counter_style)) => {
|
||||
let mut temporary_counter = Counter::new();
|
||||
let temporary_counter = Counter::new();
|
||||
let counter = self.traversal
|
||||
.counters
|
||||
.get(&*counter_name)
|
||||
.unwrap_or(&mut temporary_counter);
|
||||
.unwrap_or(&temporary_counter);
|
||||
new_info = counter.render(self.traversal.layout_context,
|
||||
fragment.node,
|
||||
fragment.pseudo,
|
||||
|
|
|
@ -1452,7 +1452,7 @@ impl LayoutTask {
|
|||
// Parallel mode.
|
||||
self.solve_constraints_parallel(parallel,
|
||||
&mut root_flow,
|
||||
&mut *layout_context);
|
||||
&*layout_context);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue