mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix more clippy (#32740)
This commit is contained in:
parent
4e1f623666
commit
f29dd64a7b
25 changed files with 72 additions and 90 deletions
|
@ -1711,14 +1711,14 @@ impl InlineFormattingContext {
|
|||
}
|
||||
|
||||
fn next_character_prevents_soft_wrap_opportunity(&self, index: usize) -> bool {
|
||||
let Some(character) = self.text_content[index..].chars().skip(1).next() else {
|
||||
let Some(character) = self.text_content[index..].chars().nth(1) else {
|
||||
return false;
|
||||
};
|
||||
char_prevents_soft_wrap_opportunity_when_before_or_after_atomic(character)
|
||||
}
|
||||
|
||||
fn previous_character_prevents_soft_wrap_opportunity(&self, index: usize) -> bool {
|
||||
let Some(character) = self.text_content[0..index].chars().rev().next() else {
|
||||
let Some(character) = self.text_content[0..index].chars().next_back() else {
|
||||
return false;
|
||||
};
|
||||
char_prevents_soft_wrap_opportunity_when_before_or_after_atomic(character)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue