Skip to content

Commit 73b2c81

Browse files
committed
Tune lints for 1.62 Rust and bump up MSRV
1 parent 998fb28 commit 73b2c81

File tree

9 files changed

+11
-8
lines changed

9 files changed

+11
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
strategy:
110110
fail-fast: false
111111
matrix:
112-
msrv: ["1.61.0"]
112+
msrv: ["1.62.0"]
113113
os:
114114
- ubuntu
115115
- macOS

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ All user visible changes to `cucumber-expressions` crate will be documented in t
1313

1414
### BC Breaks
1515

16-
- Bumped up [MSRV] to 1.61 for more clever support of [Cargo feature]s.
16+
- Bumped up [MSRV] to 1.62 for more clever support of [Cargo feature]s.
1717

1818

1919

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "cucumber-expressions"
33
version = "0.3.0-dev"
44
edition = "2021"
5-
rust-version = "1.61"
5+
rust-version = "1.62"
66
description = "Cucumber Expressions AST and parser."
77
license = "MIT OR Apache-2.0"
88
authors = [

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Crates.io](https://img.shields.io/crates/v/cucumber-expressions.svg?maxAge=2592000)](https://crates.io/crates/cucumber-expressions)
55
[![Documentation](https://docs.rs/cucumber-expressions/badge.svg)](https://docs.rs/cucumber-expressions)
66
[![CI](https://github.com/cucumber-rs/cucumber-expressions/workflows/CI/badge.svg?branch=main "CI")](https://github.com/cucumber-rs/cucumber-expressions/actions?query=workflow%3ACI+branch%3Amaster)
7-
[![Rust 1.61+](https://img.shields.io/badge/rustc-1.61+-lightgray.svg "Rust 1.61+")](https://blog.rust-lang.org/2022/05/19/Rust-1.61.0.html)
7+
[![Rust 1.62+](https://img.shields.io/badge/rustc-1.62+-lightgray.svg "Rust 1.62+")](https://blog.rust-lang.org/2022/06/30/Rust-1.62.0.html)
88
[![Unsafe Forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance)
99

1010
- [Changelog](https://github.com/cucumber-rs/cucumber-expressions/blob/main/CHANGELOG.md)

fuzz/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "cucumber-expressions-fuzz"
33
version = "0.0.0"
44
edition = "2021"
5-
rust-version = "1.61"
5+
rust-version = "1.62"
66
description = "Fuzz testing for `cucumber-expressions` crate."
77
license = "MIT OR Apache-2.0"
88
authors = [

src/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl<'s> TryFrom<&'s str> for Expression<Spanned<'s>> {
4444
})
4545
.and_then(|(rest, parsed)| {
4646
rest.is_empty()
47-
.then(|| parsed)
47+
.then_some(parsed)
4848
.ok_or(parse::Error::Other(rest, ErrorKind::Verify))
4949
})
5050
}

src/expand/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ where
538538

539539
fn next(&mut self) -> Option<Self::Item> {
540540
let next = self.iter.next();
541-
(self.iter.peek().is_some()).then(|| next).flatten()
541+
(self.iter.peek().is_some()).then_some(next).flatten()
542542
}
543543
}
544544

src/expand/parameters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ where
214214
let hir = regex_syntax::Parser::new()
215215
.parse(&re)
216216
.map_err(|err| (self.element.input, re, err))?;
217-
Ok(regex_hir::has_capture_groups(&hir).then(|| hir))
217+
Ok(regex_hir::has_capture_groups(&hir).then_some(hir))
218218
})
219219
.transpose();
220220
let parsed = match parsed {

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
clippy::decimal_literal_representation,
3434
clippy::default_union_representation,
3535
clippy::else_if_without_else,
36+
clippy::empty_drop,
3637
clippy::empty_line_after_outer_attr,
38+
clippy::empty_structs_with_brackets,
3739
clippy::equatable_if_let,
3840
clippy::exit,
3941
clippy::expect_used,
@@ -47,6 +49,7 @@
4749
clippy::imprecise_flops,
4850
clippy::index_refutable_slice,
4951
clippy::iter_with_drain,
52+
clippy::large_include_file,
5053
clippy::let_underscore_must_use,
5154
clippy::lossy_float_literal,
5255
clippy::map_err_ignore,

0 commit comments

Comments
 (0)