diff --git a/src/layout.rs b/src/layout.rs index 77132e2..66ff005 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -39,8 +39,8 @@ pub struct Layout { #[derive(Debug, PartialEq, PartialOrd, Eq, Ord, Clone)] pub enum PreviewType { NotReadable, - TooBigImage, - TooBigText, + TooLargeImage, + TooLargeText, Directory, Image, Text, @@ -186,10 +186,10 @@ impl Layout { Some(PreviewType::NotReadable) => { print!("(file not readable)"); } - Some(PreviewType::TooBigImage) => { + Some(PreviewType::TooLargeImage) => { print!("(image too big for preview: over 100MB)"); } - Some(PreviewType::TooBigText) => { + Some(PreviewType::TooLargeText) => { print!("(text too big for preview: over 1MB)"); } Some(PreviewType::Directory) => { diff --git a/src/state.rs b/src/state.rs index a4fc30f..a9ec33d 100644 --- a/src/state.rs +++ b/src/state.rs @@ -1972,13 +1972,13 @@ fn check_zoxide() -> bool { /// Set content type from ItemInfo. fn set_preview_content_type(item: &mut ItemInfo) { if item.file_size > MAX_SIZE_TO_PREVIEW { - item.preview_type = Some(PreviewType::TooBigImage); + item.preview_type = Some(PreviewType::TooLargeImage); } else if is_supported_image(item) { item.preview_type = Some(PreviewType::Image); } else if let Ok(content) = &std::fs::read(&item.file_path) { if content_inspector::inspect(content).is_text() { if item.file_size > MAX_SIZE_TO_PREVIEW_TEXT { - item.preview_type = Some(PreviewType::TooBigText); + item.preview_type = Some(PreviewType::TooLargeText); return; } if let Ok(content) = String::from_utf8(content.to_vec()) {