mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Fix clippy warnings
Depends on D96634 Differential Revision: https://phabricator.services.mozilla.com/D96636
This commit is contained in:
parent
35b4641bf9
commit
3763d9a6cc
3 changed files with 5 additions and 5 deletions
|
@ -368,7 +368,7 @@ pub fn to_css_identifier(mut camel_case: &str) -> String {
|
|||
}
|
||||
}
|
||||
if !first {
|
||||
result.push_str("-");
|
||||
result.push('-');
|
||||
}
|
||||
first = false;
|
||||
result.push_str(&segment.to_lowercase());
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ impl SharedMemoryBuilder {
|
|||
assert!(end <= self.capacity);
|
||||
|
||||
self.index = end;
|
||||
unsafe { self.buffer.offset(start as isize) as *mut T }
|
||||
unsafe { self.buffer.add(start) as *mut T }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue