From 3748e1d31ec5afcf06790ccd7a170fdcc5a71b49 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20M=2E=20Bezerra?= Date: Fri, 3 Feb 2023 01:10:25 -0300 Subject: [PATCH] add `#![warn(missing_docs)]` to `check.rs` --- src/check.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/check.rs b/src/check.rs index 058b7e8..b5b5f46 100644 --- a/src/check.rs +++ b/src/check.rs @@ -1,3 +1,7 @@ +//! Checks for errors. + +#![warn(missing_docs)] + use std::{ ops::ControlFlow, path::{Path, PathBuf}, @@ -12,6 +16,12 @@ use crate::{ warning, QuestionAction, QuestionPolicy, Result, }; +/// Check, for each file, if the mime type matches the detected extensions. +/// +/// In case the file doesn't has any extensions, try to infer the format. +/// +/// TODO: maybe the name of this should be "magic numbers" or "file signature", +/// and not MIME. pub fn check_mime_type( files: &[PathBuf], formats: &mut [Vec], @@ -87,6 +97,7 @@ pub fn check_for_non_archive_formats(files: &[PathBuf], formats: &[Vec Result<()> { if let Some(format) = formats.iter().skip(1).find(|format| format.is_archive()) { let error = FinalError::with_title(format!( -- 2.11.4.GIT