Skip to content

Commit 50b5dab

Browse files
committed
Update MSRV to 1.70
The trybuild dependency was fixed at an old version because one of its newer dependencies updated MSRV to 1.70. Now, a second trybuild dependency—which, ironically, was only used by trybuild for compatibility with pre-1.70 Rust—has changed *its* MSRV to 1.70. Even though binrw itself still does not require any 1.70+ features, it is easier to update MSRV than it is to start committing and updating Cargo.lock. If some users complain about the MSRV bump then we can do the extra work and lower it again.
1 parent 67bea40 commit 50b5dab

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
rust:
4949
- stable
5050
- nightly
51-
- 1.66 # rust-version, msrv
51+
- "1.70" # rust-version, msrv
5252
features:
5353
- name: all features
5454
value: --all-features

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ homepage = "https://binrw.rs"
1818
license = "MIT"
1919
publish = false # Use `release.sh`
2020
repository = "https://github.com/jam1garner/binrw"
21-
rust-version = "1.66"
21+
rust-version = "1.70"
2222
version = "0.15.0-pre"

binrw/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ bytemuck = "1.0.0"
2121

2222
[dev-dependencies]
2323
modular-bitfield = "0.11.0"
24-
trybuild = "=1.0.89"
24+
trybuild = "1.0.89"
2525

2626
[features]
2727
default = ["std", "verbose-backtrace"]

binrw_derive/src/binrw/parser/top_level_attrs.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ impl Input {
128128
Input::Struct(s) => s
129129
.fields
130130
.get(index)
131-
.map_or(false, |field| field.is_temp(s.for_write)),
132-
Input::Enum(e) => e.variants.get(variant_index).map_or(false, |variant| {
131+
.is_some_and(|field| field.is_temp(s.for_write)),
132+
Input::Enum(e) => e.variants.get(variant_index).is_some_and(|variant| {
133133
if let EnumVariant::Variant { options, .. } = variant {
134134
options
135135
.fields
136136
.get(index)
137-
.map_or(false, |field| field.is_temp(options.for_write))
137+
.is_some_and(|field| field.is_temp(options.for_write))
138138
} else {
139139
false
140140
}
@@ -226,7 +226,7 @@ impl Struct {
226226
pub(crate) fn is_tuple(&self) -> bool {
227227
self.fields
228228
.first()
229-
.map_or(false, |field| field.generated_ident)
229+
.is_some_and(|field| field.generated_ident)
230230
}
231231

232232
pub(crate) fn iter_permanent_idents(&self) -> impl Iterator<Item = &syn::Ident> + '_ {

0 commit comments

Comments
 (0)