1 2 3 4 5 6 7 8 9 10 11 12 13
use { phf::{phf_set, Set}, }; static IMAGE_EXTENSIONS: Set<&'static str> = phf_set! { "jpg", "JPG", "jpeg", "JPEG", "png", "PNG", }; pub fn is_image(ext: &str) -> bool { IMAGE_EXTENSIONS.contains(ext) }
1 2 3 4 5 6 7 8 9 10 11 12 13
use { phf::{phf_set, Set}, }; static IMAGE_EXTENSIONS: Set<&'static str> = phf_set! { "jpg", "JPG", "jpeg", "JPEG", "png", "PNG", }; pub fn is_image(ext: &str) -> bool { IMAGE_EXTENSIONS.contains(ext) }