mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +01:00
clippy: Fix a couple clippy warnings on macOS (#35703)
The new version of rust has more checks trying to prevent mistakes around order of operations and shifts. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
e670464fef
commit
0e85d9f30a
2 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ impl CachedKernTable {
|
|||
fn binary_search(&self, first_glyph: GlyphId, second_glyph: GlyphId) -> Option<i16> {
|
||||
let pairs = &self.font_table.buffer()[self.pair_data_range.clone()];
|
||||
|
||||
let query = first_glyph << 16 | second_glyph;
|
||||
let query = (first_glyph << 16) | second_glyph;
|
||||
let (mut start, mut end) = (0, pairs.len() / KERN_PAIR_LEN);
|
||||
while start < end {
|
||||
let i = (start + end) / 2;
|
||||
|
|
|
@ -190,7 +190,7 @@ impl DisplayItem {
|
|||
builder: &DisplayListBuilder,
|
||||
node_index: usize,
|
||||
) -> SpatialTreeItemKey {
|
||||
let pipeline_tag = (builder.pipeline_id.0 as u64) << 32 | builder.pipeline_id.1 as u64;
|
||||
let pipeline_tag = ((builder.pipeline_id.0 as u64) << 32) | builder.pipeline_id.1 as u64;
|
||||
SpatialTreeItemKey::new(pipeline_tag, node_index as u64)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue