rename max_size

This commit is contained in:
Sam Denty 2021-02-03 23:02:41 +00:00
parent 64181e1733
commit 2bbba82448
No known key found for this signature in database
GPG key ID: F3E9308D4A43BC0E
3 changed files with 4 additions and 4 deletions

2
Cargo.lock generated
View file

@ -1527,7 +1527,7 @@ checksum = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7"
[[package]]
name = "site_icons"
version = "0.1.5"
version = "0.1.6"
dependencies = [
"byteorder",
"clap",

View file

@ -1,6 +1,6 @@
[package]
name = "site_icons"
version = "0.1.5"
version = "0.1.6"
authors = ["Sam Denty <sam@samdenty.com>"]
edition = "2018"
license = "GPL-3.0"

View file

@ -34,14 +34,14 @@ impl IconSize {
Self { width, height }
}
pub fn max_size(&self) -> u32 {
pub fn max_rect(&self) -> u32 {
cmp::max(self.width, self.height)
}
}
impl Ord for IconSize {
fn cmp(&self, other: &Self) -> Ordering {
other.max_size().cmp(&self.max_size())
other.max_rect().cmp(&self.max_rect())
}
}