From 4a102d1ab445860eeda181384b08be0915310a42 Mon Sep 17 00:00:00 2001 From: Rasmus Kaj Date: Sun, 2 Jun 2024 00:30:28 +0200 Subject: [PATCH] Cleanup one step further. Allow clippy::useless_attribute directly. --- src/lib.rs | 5 +---- src/template.rs | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index cc5ca94..9da84d6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -338,10 +338,7 @@ fn handle_entries( create_dir_all(&outdir)?; let mut modrs = Vec::with_capacity(512); modrs.write_all( - b"#[allow(renamed_and_removed_lints)]\n\ - #[cfg_attr(feature=\"clippy\", \ - allow(useless_attribute))]\n\ - #[allow(unused)]\n\ + b"#[allow(clippy::useless_attribute, unused)]\n\ use super::{Html,ToHtml};\n", )?; handle_entries(&mut modrs, &path, &outdir)?; diff --git a/src/template.rs b/src/template.rs index 452928f..9cfa9d3 100644 --- a/src/template.rs +++ b/src/template.rs @@ -29,9 +29,7 @@ impl Template { ) -> io::Result<()> { out.write_all( b"use std::io::{self, Write};\n\ - #[allow(renamed_and_removed_lints)]\n\ - #[cfg_attr(feature=\"clippy\", \ - allow(useless_attribute))]\n\ + #[allow(clippy::useless_attribute)]\n\ #[allow(unused)]\n\ use super::{Html,ToHtml};\n", )?;