Skip to content

Commit 13c298d

Browse files
authored
Merge pull request #423 from Ogeon/msrv_split
Have a min and max MSRV (1.61.0 - 1.63.0)
2 parents 4a30161 + 50f24f6 commit 13c298d

File tree

9 files changed

+55
-31
lines changed

9 files changed

+55
-31
lines changed

.github/workflows/ci.yml

+23-5
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ on:
1111
name: Continuous integration
1212

1313
jobs:
14-
compile_and_test_msrv:
15-
name: Compile and test MSRV
14+
compile_and_test_min_msrv:
15+
name: Compile and test min MSRV
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, macos-latest, windows-latest]
@@ -24,9 +24,26 @@ jobs:
2424
- uses: dtolnay/rust-toolchain@1.61.0
2525
with:
2626
components: clippy
27-
- uses: taiki-e/install-action@cargo-hack
2827
- name: Minimal check
29-
run: cargo clippy -v -p palette --no-default-features --features std
28+
run: cargo clippy -v -p palette --no-default-features --features "std"
29+
- name: Default check
30+
run: cargo clippy -v -p palette
31+
- name: Default tests
32+
run: cargo test -v -p palette
33+
compile_and_test_max_msrv:
34+
name: Compile and test max MSRV
35+
strategy:
36+
matrix:
37+
os: [ubuntu-latest, macos-latest, windows-latest]
38+
runs-on: ${{ matrix.os }}
39+
env:
40+
RUSTFLAGS: -D warnings
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: dtolnay/rust-toolchain@1.63.0
44+
with:
45+
components: clippy
46+
- uses: taiki-e/install-action@cargo-hack
3047
- name: find-crate check
3148
run: cargo clippy -v -p palette --no-default-features --features "std find-crate"
3249
- name: Default check
@@ -115,7 +132,8 @@ jobs:
115132
name: ci
116133
if: success()
117134
needs:
118-
- compile_and_test_msrv
135+
- compile_and_test_min_msrv
136+
- compile_and_test_max_msrv
119137
- integration_tests
120138
- check_stable_beta_nightly
121139
- no_std

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ A color management and conversion library that focuses on maintaining correctnes
1515

1616
## Minimum Supported Rust Version (MSRV)
1717

18-
This version of Palette has been automatically tested with Rust version `1.61.0` and the `stable`, `beta`, and `nightly` channels. Future versions of the library may advance the minimum supported version to make use of new language features, but this will normally be considered a breaking change. Exceptions may be made for security patches, dependencies advancing their MSRV in minor or patch releases, and similar changes.
18+
This version of Palette has been automatically tested with Rust version `1.61.0`, `1.63.0`, and the `stable`, `beta`, and `nightly` channels. The minimum supported version may vary with the set of enabled features.
19+
20+
Future versions of the library may advance the minimum supported version to make use of new language features, but this will normally be considered a breaking change. Exceptions may be made for security patches, dependencies advancing their MSRV in minor or patch releases, and similar changes.
1921

2022
## Contributing
2123

palette/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ A color management and conversion library that focuses on maintaining correctnes
1515

1616
## Minimum Supported Rust Version (MSRV)
1717

18-
This version of Palette has been automatically tested with Rust version `1.61.0` and the `stable`, `beta`, and `nightly` channels. Future versions of the library may advance the minimum supported version to make use of new language features, but this will normally be considered a breaking change. Exceptions may be made for security patches, dependencies advancing their MSRV in minor or patch releases, and similar changes.
18+
This version of Palette has been automatically tested with Rust version `1.61.0`, `1.63.0`, and the `stable`, `beta`, and `nightly` channels. The minimum supported version may vary with the set of enabled features.
19+
20+
Future versions of the library may advance the minimum supported version to make use of new language features, but this will normally be considered a breaking change. Exceptions may be made for security patches, dependencies advancing their MSRV in minor or patch releases, and similar changes.
1921

2022
## Getting Started
2123

palette/src/cast/as_arrays_traits.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub trait AsArraysMut<A: ?Sized> {
5353
macro_rules! impl_as_arrays {
5454
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
5555
$(
56-
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> AsArrays<[[T; N]]> for $owning
56+
impl<T, C, const N: usize $(, $($ty_input)+)?> AsArrays<[[T; N]]> for $owning
5757
where
5858
C: ArrayCast<Array = [T; N]>,
5959
{
@@ -63,7 +63,7 @@ macro_rules! impl_as_arrays {
6363
}
6464
}
6565

66-
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> AsArraysMut<[[T; N]]> for $owning
66+
impl<T, C, const N: usize $(, $($ty_input)+)?> AsArraysMut<[[T; N]]> for $owning
6767
where
6868
C: ArrayCast<Array = [T; N]>,
6969
{
@@ -142,7 +142,7 @@ pub trait ArraysAsMut<C: ?Sized> {
142142
macro_rules! impl_arrays_as {
143143
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
144144
$(
145-
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> ArraysAs<[C]> for $owning
145+
impl<T, C, const N: usize $(, $($ty_input)+)?> ArraysAs<[C]> for $owning
146146
where
147147
C: ArrayCast<Array = [T; N]>,
148148
{
@@ -152,7 +152,7 @@ macro_rules! impl_arrays_as {
152152
}
153153
}
154154

155-
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> ArraysAsMut<[C]> for $owning
155+
impl<T, C, const N: usize $(, $($ty_input)+)?> ArraysAsMut<[C]> for $owning
156156
where
157157
C: ArrayCast<Array = [T; N]>,
158158
{

palette/src/cast/as_components_traits.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub trait AsComponentsMut<C: ?Sized> {
5757
macro_rules! impl_as_components {
5858
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
5959
$(
60-
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> AsComponents<[T]> for $owning
60+
impl<T, C, const N: usize $(, $($ty_input)+)?> AsComponents<[T]> for $owning
6161
where
6262
C: ArrayCast<Array = [T; N]>,
6363
{
@@ -67,7 +67,7 @@ macro_rules! impl_as_components {
6767
}
6868
}
6969

70-
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> AsComponentsMut<[T]> for $owning
70+
impl<T, C, const N: usize $(, $($ty_input)+)?> AsComponentsMut<[T]> for $owning
7171
where
7272
C: ArrayCast<Array = [T; N]>,
7373
{
@@ -192,7 +192,7 @@ pub trait TryComponentsAsMut<C: ?Sized> {
192192
macro_rules! impl_try_components_as {
193193
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
194194
$(
195-
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> TryComponentsAs<[C]> for $owning
195+
impl<T, C, const N: usize $(, $($ty_input)+)?> TryComponentsAs<[C]> for $owning
196196
where
197197
C: ArrayCast<Array = [T; N]>,
198198
{
@@ -204,7 +204,7 @@ macro_rules! impl_try_components_as {
204204
}
205205
}
206206

207-
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> TryComponentsAsMut<[C]> for $owning
207+
impl<T, C, const N: usize $(, $($ty_input)+)?> TryComponentsAsMut<[C]> for $owning
208208
where
209209
C: ArrayCast<Array = [T; N]>,
210210
{

palette/src/cast/as_uints_traits.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub trait AsUintsMut<A: ?Sized> {
6969
macro_rules! impl_as_uints {
7070
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
7171
$(
72-
impl<'a, C $(, $($ty_input)+)?> AsUints<[C::Uint]> for $owning
72+
impl<C $(, $($ty_input)+)?> AsUints<[C::Uint]> for $owning
7373
where
7474
C: UintCast,
7575
{
@@ -79,7 +79,7 @@ macro_rules! impl_as_uints {
7979
}
8080
}
8181

82-
impl<'a, C $(, $($ty_input)+)?> AsUintsMut<[C::Uint]> for $owning
82+
impl<C $(, $($ty_input)+)?> AsUintsMut<[C::Uint]> for $owning
8383
where
8484
C: UintCast,
8585
{
@@ -194,7 +194,7 @@ pub trait UintsAsMut<C: ?Sized> {
194194
macro_rules! impl_uints_as {
195195
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
196196
$(
197-
impl<'a, C $(, $($ty_input)+)?> UintsAs<[C]> for $owning
197+
impl<C $(, $($ty_input)+)?> UintsAs<[C]> for $owning
198198
where
199199
C: UintCast,
200200
{
@@ -204,7 +204,7 @@ macro_rules! impl_uints_as {
204204
}
205205
}
206206

207-
impl<'a, C $(, $($ty_input)+)?> UintsAsMut<[C]> for $owning
207+
impl<C $(, $($ty_input)+)?> UintsAsMut<[C]> for $owning
208208
where
209209
C: UintCast,
210210
{

palette/src/macros/struct_of_arrays.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ macro_rules! impl_struct_of_array_traits {
150150
}
151151

152152
#[cfg(feature = "alloc")]
153-
impl<'a, $($phantom_ty,)? T> IntoIterator for crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
153+
impl<$($phantom_ty,)? T> IntoIterator for crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
154154
{
155155
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? T>, T>;
156156

@@ -268,7 +268,7 @@ macro_rules! impl_struct_of_array_traits {
268268
}
269269

270270
#[cfg(feature = "alloc")]
271-
impl<'a, 'b, $($phantom_ty,)? T> IntoIterator for &'a crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
271+
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
272272
{
273273
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a T>, &'a T>;
274274

@@ -299,7 +299,7 @@ macro_rules! impl_struct_of_array_traits {
299299
}
300300

301301
#[cfg(feature = "alloc")]
302-
impl<'a, 'b, $($phantom_ty,)? T> IntoIterator for &'a crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::boxed::Box<[T]>>, alloc::boxed::Box<[T]>>
302+
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::boxed::Box<[T]>>, alloc::boxed::Box<[T]>>
303303
{
304304
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a T>, &'a T>;
305305

@@ -388,7 +388,7 @@ macro_rules! impl_struct_of_array_traits {
388388
}
389389

390390
#[cfg(feature = "alloc")]
391-
impl<'a, 'b, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
391+
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
392392
{
393393
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a mut T>, &'a mut T>;
394394

@@ -421,7 +421,7 @@ macro_rules! impl_struct_of_array_traits {
421421
}
422422

423423
#[cfg(feature = "alloc")]
424-
impl<'a, 'b, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::boxed::Box<[T]>>, alloc::boxed::Box<[T]>>
424+
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::boxed::Box<[T]>>, alloc::boxed::Box<[T]>>
425425
{
426426
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a mut T>, &'a mut T>;
427427

@@ -658,7 +658,7 @@ macro_rules! impl_struct_of_array_traits_hue {
658658
}
659659

660660
#[cfg(feature = "alloc")]
661-
impl<'a, $($phantom_ty,)? T> IntoIterator for crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
661+
impl<$($phantom_ty,)? T> IntoIterator for crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
662662
{
663663
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? T>, T>;
664664

@@ -780,7 +780,7 @@ macro_rules! impl_struct_of_array_traits_hue {
780780
}
781781

782782
#[cfg(feature = "alloc")]
783-
impl<'a, 'b, $($phantom_ty,)? T> IntoIterator for &'a crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
783+
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
784784
{
785785
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a T>, &'a T>;
786786

@@ -812,7 +812,7 @@ macro_rules! impl_struct_of_array_traits_hue {
812812
}
813813

814814
#[cfg(feature = "alloc")]
815-
impl<'a, 'b, $($phantom_ty,)? T> IntoIterator for &'a crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::boxed::Box<[T]>>, alloc::boxed::Box<[T]>>
815+
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::boxed::Box<[T]>>, alloc::boxed::Box<[T]>>
816816
{
817817
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a T>, &'a T>;
818818

@@ -904,7 +904,7 @@ macro_rules! impl_struct_of_array_traits_hue {
904904
}
905905

906906
#[cfg(feature = "alloc")]
907-
impl<'a, 'b, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
907+
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
908908
{
909909
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a mut T>, &'a mut T>;
910910

@@ -936,7 +936,7 @@ macro_rules! impl_struct_of_array_traits_hue {
936936
}
937937

938938
#[cfg(feature = "alloc")]
939-
impl<'a, 'b, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::boxed::Box<[T]>>, alloc::boxed::Box<[T]>>
939+
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::boxed::Box<[T]>>, alloc::boxed::Box<[T]>>
940940
{
941941
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a mut T>, &'a mut T>;
942942

palette_derive/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Contains derive macros for the [`palette`](https://crates.io/crates/palette/) cr
44

55
## Minimum Supported Rust Version (MSRV)
66

7-
This version of Palette has been automatically tested with Rust version `1.61.0` and the `stable`, `beta`, and `nightly` channels. Future versions of the library may advance the minimum supported version to make use of new language features, but this will normally be considered a breaking change. Exceptions may be made for security patches, dependencies advancing their MSRV in minor or patch releases, and similar changes.
7+
This version of Palette has been automatically tested with Rust version `1.61.0`, `1.63.0`, and the `stable`, `beta`, and `nightly` channels. The minimum supported version may vary with the set of enabled features.
8+
9+
Future versions of the library may advance the minimum supported version to make use of new language features, but this will normally be considered a breaking change. Exceptions may be made for security patches, dependencies advancing their MSRV in minor or patch releases, and similar changes.
810

911
## License
1012

palette_derive/src/meta/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ pub fn assert_path_meta(meta: &Meta) -> Result<()> {
140140
Ok(())
141141
}
142142

143-
#[derive(PartialEq)]
143+
#[derive(PartialEq, Eq)]
144144
pub struct KeyValuePair {
145145
pub key: Ident,
146146
pub value: Ident,

0 commit comments

Comments
 (0)