mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #23499 - est31:unused_code_removal_3, r=jdm
Remove unused code (3/N) <!-- Please describe your changes on the following line: --> Third PR in a series of PRs to remove unused/dead code from servo, powered by an (upcoming) tool of mine. Please take a look and tell me if you want to keep something. * First PR: #23477 * Second PR: #23498 --- <!-- 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 - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they only remove dead code <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23499) <!-- Reviewable:end -->
This commit is contained in:
commit
faf3a183f3
19 changed files with 4 additions and 203 deletions
|
@ -1146,26 +1146,6 @@ fn write_image(
|
|||
draw_target.draw_surface(source_surface, dest_rect, image_rect, filter, draw_options);
|
||||
}
|
||||
|
||||
pub trait PointToi32 {
|
||||
fn to_i32(&self) -> Point2D<i32>;
|
||||
}
|
||||
|
||||
impl PointToi32 for Point2D<f64> {
|
||||
fn to_i32(&self) -> Point2D<i32> {
|
||||
Point2D::new(self.x.to_i32().unwrap(), self.y.to_i32().unwrap())
|
||||
}
|
||||
}
|
||||
|
||||
pub trait SizeToi32 {
|
||||
fn to_i32(&self) -> Size2D<i32>;
|
||||
}
|
||||
|
||||
impl SizeToi32 for Size2D<f64> {
|
||||
fn to_i32(&self) -> Size2D<i32> {
|
||||
Size2D::new(self.width.to_i32().unwrap(), self.height.to_i32().unwrap())
|
||||
}
|
||||
}
|
||||
|
||||
pub trait RectToi32 {
|
||||
fn to_i32(&self) -> Rect<i32>;
|
||||
fn ceil(&self) -> Rect<f64>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue