Compare commits
No commits in common. "f09a02a58d8e7bf2bdd3e7209d80f3be4fe2787d" and "0e96a25e461f50cf79bc70c60b6bc45febdad5ef" have entirely different histories.
f09a02a58d
...
0e96a25e46
2 changed files with 1 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "bingus"
|
name = "bingus"
|
||||||
version = "0.8.0"
|
version = "0.6.0"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
description.workspace = true
|
description.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -29,22 +29,12 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq)]
|
|
||||||
#[cfg_attr(debug_assertions, derive(Debug))]
|
#[cfg_attr(debug_assertions, derive(Debug))]
|
||||||
pub struct Dimensions {
|
pub struct Dimensions {
|
||||||
pub width: u32,
|
pub width: u32,
|
||||||
pub height: u32,
|
pub height: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Dimensions {
|
|
||||||
pub fn square(width: u32) -> Self {
|
|
||||||
Self {
|
|
||||||
width,
|
|
||||||
height: width,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Div<Dimensions> for Dimensions {
|
impl Div<Dimensions> for Dimensions {
|
||||||
type Output = Dimensions;
|
type Output = Dimensions;
|
||||||
fn div(self, rhs: Dimensions) -> Self::Output {
|
fn div(self, rhs: Dimensions) -> Self::Output {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue