Rename this function for clarity
- ID
e704d87- date
2024-09-04 06:41:07+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
a0582b8- message
Rename this function for clarity- changed files
1 file, 2 additions, 2 deletions
Changed files
src/get_image_colors.rs (5613) → src/get_image_colors.rs (5623)
diff --git a/src/get_image_colors.rs b/src/get_image_colors.rs
index 83cc28a..a40b013 100644
--- a/src/get_image_colors.rs
+++ b/src/get_image_colors.rs
@@ -25,7 +25,7 @@ pub fn get_image_colors(path: &PathBuf) -> Vec<Lab> {
let image_bytes = match extension {
Some(ext) if ext == "gif" => get_bytes_for_gif(&path),
- _ => get_bytes_for_non_gif(&path),
+ _ => get_bytes_for_static_image(&path),
};
let lab: Vec<Lab> = from_component_slice::<Srgba<u8>>(&image_bytes)
@@ -36,7 +36,7 @@ pub fn get_image_colors(path: &PathBuf) -> Vec<Lab> {
lab
}
-fn get_bytes_for_non_gif(path: &PathBuf) -> Vec<u8> {
+fn get_bytes_for_static_image(path: &PathBuf) -> Vec<u8> {
let img = match image::open(&path) {
Ok(im) => im,
Err(e) => {