From a73822d3b919fa6d5dde92f345c12fd88ba9f56e Mon Sep 17 00:00:00 2001 From: Rui <xiongmao86dev@sina.com> Date: Sun, 5 Jan 2020 20:25:07 +0800 Subject: [PATCH] Fix documents and messages. Update clippy_lints/src/methods/mod.rs --- clippy_lints/src/methods/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index a56334dc150..4c372e019dc 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -1135,7 +1135,7 @@ declare_clippy_lint! { /// /// **Why is this bad?** When people testing a file type with `FileType::is_file` /// they are testing whether a path is something they can get bytes from. But - /// `is_file` doesn't cover special file types in unix-like systems. and not covering + /// `is_file` doesn't cover special file types in unix-like systems, and doesn't cover /// symlink in windows. Using `!FileType::is_dir()` is a better way to that intention. /// /// **Example:** @@ -1149,7 +1149,7 @@ declare_clippy_lint! { /// } /// ``` /// - /// should be writing as: + /// should be written as: /// /// ```rust,ignore /// let metadata = std::fs::metadata("foo.txt")?; @@ -1160,8 +1160,8 @@ declare_clippy_lint! { /// } /// ``` pub FILETYPE_IS_FILE, - style, - "`FileType::is_file` is not recommended to test for readable file type." + restriction, + "`FileType::is_file` is not recommended to test for readable file type" } declare_lint_pass!(Methods => [