aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo_arc/lib.rs
diff options
context:
space:
mode:
authorSylvestre Ledru <sledru@mozilla.com>2020-11-17 12:02:22 +0000
committerMartin Robinson <mrobinson@igalia.com>2023-11-21 15:36:35 +0100
commit3763d9a6cc463b12ab86db41ca33ba76820430e2 (patch)
tree4d9767d8093d0385a9a4a9bf15afcf824ed18750 /components/servo_arc/lib.rs
parent35b4641bf91ed932919d543bfb7deba599174adb (diff)
downloadservo-3763d9a6cc463b12ab86db41ca33ba76820430e2.tar.gz
servo-3763d9a6cc463b12ab86db41ca33ba76820430e2.zip
style: Fix clippy warnings
Depends on D96634 Differential Revision: https://phabricator.services.mozilla.com/D96636
Diffstat (limited to 'components/servo_arc/lib.rs')
-rw-r--r--components/servo_arc/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/servo_arc/lib.rs b/components/servo_arc/lib.rs
index 5169c3a1ade..505d7d51c89 100644
--- a/components/servo_arc/lib.rs
+++ b/components/servo_arc/lib.rs
@@ -770,7 +770,7 @@ impl<H, T> Arc<HeaderSlice<H, [T]>> {
// We should have consumed the buffer exactly, maybe accounting
// for some padding from the alignment.
debug_assert!(
- (buffer.offset(size as isize) as usize - current as *mut u8 as usize) <
+ (buffer.add(size) as usize - current as *mut u8 as usize) <
inner_align
);
}
@@ -858,8 +858,8 @@ impl<H> HeaderWithLength<H> {
/// Creates a new HeaderWithLength.
pub fn new(header: H, length: usize) -> Self {
HeaderWithLength {
- header: header,
- length: length,
+ header,
+ length,
}
}
}