Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Palette sorting #193

Merged
merged 4 commits into from
Sep 10, 2019
Merged

Palette sorting #193

merged 4 commits into from
Sep 10, 2019

Conversation

kornelski
Copy link
Contributor

Fixes #184

@@ -61,9 +61,24 @@ pub fn reduced_palette(png: &PngImage) -> Option<PngImage> {
}
}

let mut used_enumerated : Vec<(usize, &bool)>= used.iter().enumerate().collect();
used_enumerated.sort_by(|a, b| {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use itertools to make this a little more concise.

src/reduction/mod.rs Outdated Show resolved Hide resolved
@shssoichiro shssoichiro merged commit e473958 into shssoichiro:master Sep 10, 2019
@kornelski kornelski deleted the palette-sorting branch September 11, 2019 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants