diff options
author | Martin Robinson <mrobinson@igalia.com> | 2024-04-22 20:20:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-22 18:20:47 +0000 |
commit | a0640c8524b471462af8a352d87c38fa63337914 (patch) | |
tree | 5564446fbd289c6bd9a23d51518aaa85de286ad6 /components/script/euclidext.rs | |
parent | f65010c97d50f0e2172c9d4477cc702099d44263 (diff) | |
download | servo-a0640c8524b471462af8a352d87c38fa63337914.tar.gz servo-a0640c8524b471462af8a352d87c38fa63337914.zip |
Address issues uncovered by rust-1.78 beta (#32130)
This change makes changes to allow Servo to compile with the 1.78
version of Rust:
- Dead code is removd (Rust seems to have gotten better at detecting
it).
- The `FlowRef` `DerefMut` is updated according to @SimonSapin's advice
[^1].
- The `imports.rs` now explicitly silences warnings about unused
imports.
[^1]: https://github.com/servo/servo/issues/6503#issuecomment-2066088179
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they should not change
behavior.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->
<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->
Diffstat (limited to 'components/script/euclidext.rs')
-rw-r--r-- | components/script/euclidext.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/components/script/euclidext.rs b/components/script/euclidext.rs deleted file mode 100644 index c6eb72f89fc..00000000000 --- a/components/script/euclidext.rs +++ /dev/null @@ -1,21 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -use euclid::default::Rect; - -pub trait RectExt { - fn to_u64(&self) -> Rect<u64>; -} - -impl RectExt for Rect<f64> { - fn to_u64(&self) -> Rect<u64> { - self.cast() - } -} - -impl RectExt for Rect<u32> { - fn to_u64(&self) -> Rect<u64> { - self.cast() - } -} |