Auto merge of #9229 - FoseFx:case_sensitive_file_extension_comparisons_doc, r=dswij

Update case_sensitive_file_extension_comparisons example

Closing #9220

changelog: [`case_sensitive_file_extension_comparisons`]: update example
This commit is contained in:
bors 2022-07-23 11:59:19 +00:00
commit 75dcbd5b92

View File

@ -24,7 +24,10 @@ declare_clippy_lint! {
/// Use instead:
/// ```rust
/// fn is_rust_file(filename: &str) -> bool {
/// filename.rsplit('.').next().map(|ext| ext.eq_ignore_ascii_case("rs")) == Some(true)
/// let filename = std::path::Path::new(filename);
/// filename.extension()
/// .map(|ext| ext.eq_ignore_ascii_case("rs"))
/// .unwrap_or(false)
/// }
/// ```
#[clippy::version = "1.51.0"]