Correct privacy for Icon::to_cardinals (#510)

This commit is contained in:
Francesca Frangipane 2018-05-10 18:42:41 -04:00 committed by GitHub
parent e48f1fc5f1
commit 741bcc4672
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,7 @@
# Unreleased # Unreleased
- `Icon::to_cardinals` is no longer public, since it was never supposed to be.
# Version 0.14.0 (2018-05-09) # Version 0.14.0 (2018-05-09)
- Created the `Copy`, `Paste` and `Cut` `VirtualKeyCode`s and added support for them on X11 and Wayland - Created the `Copy`, `Paste` and `Cut` `VirtualKeyCode`s and added support for them on X11 and Wayland

View file

@ -17,7 +17,7 @@ impl Pixel {
} }
impl Icon { impl Icon {
pub fn to_cardinals(&self) -> Vec<Cardinal> { pub(crate) fn to_cardinals(&self) -> Vec<Cardinal> {
assert_eq!(self.rgba.len() % PIXEL_SIZE, 0); assert_eq!(self.rgba.len() % PIXEL_SIZE, 0);
let pixel_count = self.rgba.len() / PIXEL_SIZE; let pixel_count = self.rgba.len() / PIXEL_SIZE;
assert_eq!(pixel_count, (self.width * self.height) as usize); assert_eq!(pixel_count, (self.width * self.height) as usize);