Remove unused code from a bunch of crates

This commit is contained in:
est31 2019-06-02 07:12:44 +02:00
parent 8b6ed3d182
commit e64de8d90a
8 changed files with 6 additions and 74 deletions

View file

@ -997,26 +997,6 @@ fn write_image(
);
}
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>;

View file

@ -147,17 +147,6 @@ impl GLContextWrapper {
}
}
pub fn unbind(&self) {
match *self {
GLContextWrapper::Native(ref ctx) => {
ctx.unbind().unwrap();
},
GLContextWrapper::OSMesa(ref ctx) => {
ctx.unbind().unwrap();
},
}
}
pub fn apply_command(
&self,
cmd: WebGLCommand,