From ba0bfaf9ecf860de70c8ee097b33490a9fc4b63e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tau=20G=C3=A4rtli?= Date: Fri, 6 Sep 2024 14:39:52 +0200 Subject: Fix clippy warnings (#1851) * Fix non-portable doc comments warning A line starting with > might be interpreted as a block quote. In regular markdown this could be prevented by escaping the `>` using a backslash. However, since the doc comments are used by clap for the long help more or less verbatim, the `\` would be visible hence the shuffling around of words. * Use `.contains()` --- src/utils/helpwrap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/helpwrap.rs') diff --git a/src/utils/helpwrap.rs b/src/utils/helpwrap.rs index 24191d2..c091e32 100644 --- a/src/utils/helpwrap.rs +++ b/src/utils/helpwrap.rs @@ -103,7 +103,7 @@ pub fn wrap(text: &str, width: usize, indent_with: &str, no_indent: &str, no_wra } #[cfg(test)] - if result.find("no-sanity").is_none() { + if !result.contains("no-sanity") { // sanity check let stripped_input = text .replace(" ", "") -- cgit v1.2.3