File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,14 @@ All notable changes to this project will be documented in this file.
13
13
` AsRef<str> ` , since we use the parameters in format strings. This is very
14
14
unlikely to break anything.
15
15
16
+ ### Changes
17
+
18
+ * Switched [ code to disable Clippy] [ disable_clippy ] to use ` cfg(clippy) ` instead
19
+ of ` cfg(feature = "cargo-clippy") ` . The [ feature has been deprecated] .
20
+
21
+ [ disable_clippy ] : https://docs.rs/matchgen/latest/matchgen/struct.TreeMatcher.html#method.disable_clippy
22
+ [ feature has been deprecated ] : https://blog.rust-lang.org/2024/02/28/Clippy-deprecating-feature-cargo-clippy.html
23
+
16
24
## Release 0.2.0 (2023-05-26)
17
25
18
26
This release is primarily aimed at ensuring generated code passes lints.
Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ impl TreeMatcher {
361
361
///
362
362
/// use bstr::ByteVec;
363
363
/// pretty_assertions::assert_str_eq!(
364
- /// r#"#[cfg(not(feature = "cargo- clippy" ))]
364
+ /// r#"#[cfg(not(clippy))]
365
365
/// #[must_use]
366
366
/// fn match_bytes(slice: &[u8]) -> (Option<u64>, &[u8]) {
367
367
/// match slice.first() {
@@ -370,7 +370,7 @@ impl TreeMatcher {
370
370
/// }
371
371
/// }
372
372
///
373
- /// #[cfg(feature = "cargo- clippy" )]
373
+ /// #[cfg(clippy)]
374
374
/// #[must_use]
375
375
/// fn match_bytes(slice: &[u8]) -> (Option<u64>, &[u8]) {
376
376
/// (None, slice)
@@ -385,14 +385,14 @@ impl TreeMatcher {
385
385
/// This can return [`io::Error`] if there is a problem writing to `writer`.
386
386
pub fn render < W : io:: Write > ( & self , writer : & mut W ) -> io:: Result < ( ) > {
387
387
if self . disable_clippy {
388
- writeln ! ( writer, "#[cfg(not(feature = \" cargo- clippy\" ))]" ) ?;
388
+ writeln ! ( writer, "#[cfg(not(clippy))]" ) ?;
389
389
}
390
390
391
391
self . render_func ( writer) ?;
392
392
393
393
if self . disable_clippy {
394
394
writeln ! ( writer) ?;
395
- writeln ! ( writer, "#[cfg(feature = \" cargo- clippy\" )]" ) ?;
395
+ writeln ! ( writer, "#[cfg(clippy)]" ) ?;
396
396
self . render_stub ( writer) ?;
397
397
}
398
398
You can’t perform that action at this time.
0 commit comments