aboutsummaryrefslogtreecommitdiffstats
path: root/components/shared/gfx/lib.rs
diff options
context:
space:
mode:
authoreri <eri@inventati.org>2024-03-08 16:28:19 +0100
committerGitHub <noreply@github.com>2024-03-08 15:28:19 +0000
commit43f44965cda8751e04195bf4c4f298147907843f (patch)
tree970527d416716fcd82caf89a5821c050b62a6145 /components/shared/gfx/lib.rs
parent3a5ca785d3ecc1fd6cb5a519cf1a91ac61e15c8c (diff)
downloadservo-43f44965cda8751e04195bf4c4f298147907843f.tar.gz
servo-43f44965cda8751e04195bf4c4f298147907843f.zip
clippy: fix warnings in components/shared (#31565)
* clippy: fix some warnings in components/shared * fix: unit tests * fix: review comments
Diffstat (limited to 'components/shared/gfx/lib.rs')
-rw-r--r--components/shared/gfx/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/shared/gfx/lib.rs b/components/shared/gfx/lib.rs
index 7cac7ef1fb1..e3749b37e03 100644
--- a/components/shared/gfx/lib.rs
+++ b/components/shared/gfx/lib.rs
@@ -25,9 +25,9 @@ impl Epoch {
}
}
-impl Into<WebRenderEpoch> for Epoch {
- fn into(self) -> WebRenderEpoch {
- WebRenderEpoch(self.0)
+impl From<Epoch> for WebRenderEpoch {
+ fn from(val: Epoch) -> Self {
+ WebRenderEpoch(val.0)
}
}
@@ -114,7 +114,7 @@ pub fn combine_id_with_fragment_type(id: usize, fragment_type: FragmentType) ->
pub fn node_id_from_scroll_id(id: usize) -> Option<usize> {
if (id & !SPECIAL_SCROLL_ROOT_ID_MASK) != 0 {
- return Some((id & !3) as usize);
+ return Some(id & !3);
}
None
}