Skip to content

Commit

Permalink
Merge pull request #423 from Ogeon/msrv_split
Browse files Browse the repository at this point in the history
Have a min and max MSRV (1.61.0 - 1.63.0)
  • Loading branch information
Ogeon authored Nov 16, 2024
2 parents 4a30161 + 50f24f6 commit 13c298d
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 31 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
name: Continuous integration

jobs:
compile_and_test_msrv:
name: Compile and test MSRV
compile_and_test_min_msrv:
name: Compile and test min MSRV
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand All @@ -24,9 +24,26 @@ jobs:
- uses: dtolnay/[email protected]
with:
components: clippy
- uses: taiki-e/install-action@cargo-hack
- name: Minimal check
run: cargo clippy -v -p palette --no-default-features --features std
run: cargo clippy -v -p palette --no-default-features --features "std"
- name: Default check
run: cargo clippy -v -p palette
- name: Default tests
run: cargo test -v -p palette
compile_and_test_max_msrv:
name: Compile and test max MSRV
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
with:
components: clippy
- uses: taiki-e/install-action@cargo-hack
- name: find-crate check
run: cargo clippy -v -p palette --no-default-features --features "std find-crate"
- name: Default check
Expand Down Expand Up @@ -115,7 +132,8 @@ jobs:
name: ci
if: success()
needs:
- compile_and_test_msrv
- compile_and_test_min_msrv
- compile_and_test_max_msrv
- integration_tests
- check_stable_beta_nightly
- no_std
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ A color management and conversion library that focuses on maintaining correctnes

## Minimum Supported Rust Version (MSRV)

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.
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.

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.

## Contributing

Expand Down
4 changes: 3 additions & 1 deletion palette/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ A color management and conversion library that focuses on maintaining correctnes

## Minimum Supported Rust Version (MSRV)

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.
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.

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.

## Getting Started

Expand Down
8 changes: 4 additions & 4 deletions palette/src/cast/as_arrays_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub trait AsArraysMut<A: ?Sized> {
macro_rules! impl_as_arrays {
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
$(
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> AsArrays<[[T; N]]> for $owning
impl<T, C, const N: usize $(, $($ty_input)+)?> AsArrays<[[T; N]]> for $owning
where
C: ArrayCast<Array = [T; N]>,
{
Expand All @@ -63,7 +63,7 @@ macro_rules! impl_as_arrays {
}
}

impl<'a, T, C, const N: usize $(, $($ty_input)+)?> AsArraysMut<[[T; N]]> for $owning
impl<T, C, const N: usize $(, $($ty_input)+)?> AsArraysMut<[[T; N]]> for $owning
where
C: ArrayCast<Array = [T; N]>,
{
Expand Down Expand Up @@ -142,7 +142,7 @@ pub trait ArraysAsMut<C: ?Sized> {
macro_rules! impl_arrays_as {
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
$(
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> ArraysAs<[C]> for $owning
impl<T, C, const N: usize $(, $($ty_input)+)?> ArraysAs<[C]> for $owning
where
C: ArrayCast<Array = [T; N]>,
{
Expand All @@ -152,7 +152,7 @@ macro_rules! impl_arrays_as {
}
}

impl<'a, T, C, const N: usize $(, $($ty_input)+)?> ArraysAsMut<[C]> for $owning
impl<T, C, const N: usize $(, $($ty_input)+)?> ArraysAsMut<[C]> for $owning
where
C: ArrayCast<Array = [T; N]>,
{
Expand Down
8 changes: 4 additions & 4 deletions palette/src/cast/as_components_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub trait AsComponentsMut<C: ?Sized> {
macro_rules! impl_as_components {
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
$(
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> AsComponents<[T]> for $owning
impl<T, C, const N: usize $(, $($ty_input)+)?> AsComponents<[T]> for $owning
where
C: ArrayCast<Array = [T; N]>,
{
Expand All @@ -67,7 +67,7 @@ macro_rules! impl_as_components {
}
}

impl<'a, T, C, const N: usize $(, $($ty_input)+)?> AsComponentsMut<[T]> for $owning
impl<T, C, const N: usize $(, $($ty_input)+)?> AsComponentsMut<[T]> for $owning
where
C: ArrayCast<Array = [T; N]>,
{
Expand Down Expand Up @@ -192,7 +192,7 @@ pub trait TryComponentsAsMut<C: ?Sized> {
macro_rules! impl_try_components_as {
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
$(
impl<'a, T, C, const N: usize $(, $($ty_input)+)?> TryComponentsAs<[C]> for $owning
impl<T, C, const N: usize $(, $($ty_input)+)?> TryComponentsAs<[C]> for $owning
where
C: ArrayCast<Array = [T; N]>,
{
Expand All @@ -204,7 +204,7 @@ macro_rules! impl_try_components_as {
}
}

impl<'a, T, C, const N: usize $(, $($ty_input)+)?> TryComponentsAsMut<[C]> for $owning
impl<T, C, const N: usize $(, $($ty_input)+)?> TryComponentsAsMut<[C]> for $owning
where
C: ArrayCast<Array = [T; N]>,
{
Expand Down
8 changes: 4 additions & 4 deletions palette/src/cast/as_uints_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub trait AsUintsMut<A: ?Sized> {
macro_rules! impl_as_uints {
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
$(
impl<'a, C $(, $($ty_input)+)?> AsUints<[C::Uint]> for $owning
impl<C $(, $($ty_input)+)?> AsUints<[C::Uint]> for $owning
where
C: UintCast,
{
Expand All @@ -79,7 +79,7 @@ macro_rules! impl_as_uints {
}
}

impl<'a, C $(, $($ty_input)+)?> AsUintsMut<[C::Uint]> for $owning
impl<C $(, $($ty_input)+)?> AsUintsMut<[C::Uint]> for $owning
where
C: UintCast,
{
Expand Down Expand Up @@ -194,7 +194,7 @@ pub trait UintsAsMut<C: ?Sized> {
macro_rules! impl_uints_as {
($($owning:ty $(where ($($ty_input:tt)+))?),*) => {
$(
impl<'a, C $(, $($ty_input)+)?> UintsAs<[C]> for $owning
impl<C $(, $($ty_input)+)?> UintsAs<[C]> for $owning
where
C: UintCast,
{
Expand All @@ -204,7 +204,7 @@ macro_rules! impl_uints_as {
}
}

impl<'a, C $(, $($ty_input)+)?> UintsAsMut<[C]> for $owning
impl<C $(, $($ty_input)+)?> UintsAsMut<[C]> for $owning
where
C: UintCast,
{
Expand Down
20 changes: 10 additions & 10 deletions palette/src/macros/struct_of_arrays.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ macro_rules! impl_struct_of_array_traits {
}

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

Expand Down Expand Up @@ -268,7 +268,7 @@ macro_rules! impl_struct_of_array_traits {
}

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

Expand Down Expand Up @@ -299,7 +299,7 @@ macro_rules! impl_struct_of_array_traits {
}

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

Expand Down Expand Up @@ -388,7 +388,7 @@ macro_rules! impl_struct_of_array_traits {
}

#[cfg(feature = "alloc")]
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>>
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
{
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a mut T>, &'a mut T>;

Expand Down Expand Up @@ -421,7 +421,7 @@ macro_rules! impl_struct_of_array_traits {
}

#[cfg(feature = "alloc")]
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]>>
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::boxed::Box<[T]>>, alloc::boxed::Box<[T]>>
{
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a mut T>, &'a mut T>;

Expand Down Expand Up @@ -658,7 +658,7 @@ macro_rules! impl_struct_of_array_traits_hue {
}

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

Expand Down Expand Up @@ -780,7 +780,7 @@ macro_rules! impl_struct_of_array_traits_hue {
}

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

Expand Down Expand Up @@ -812,7 +812,7 @@ macro_rules! impl_struct_of_array_traits_hue {
}

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

Expand Down Expand Up @@ -904,7 +904,7 @@ macro_rules! impl_struct_of_array_traits_hue {
}

#[cfg(feature = "alloc")]
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>>
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::vec::Vec<T>>, alloc::vec::Vec<T>>
{
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a mut T>, &'a mut T>;

Expand Down Expand Up @@ -936,7 +936,7 @@ macro_rules! impl_struct_of_array_traits_hue {
}

#[cfg(feature = "alloc")]
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]>>
impl<'a, $($phantom_ty,)? T> IntoIterator for &'a mut crate::alpha::Alpha<$self_ty<$($phantom_ty,)? alloc::boxed::Box<[T]>>, alloc::boxed::Box<[T]>>
{
type Item = crate::alpha::Alpha<$self_ty<$($phantom_ty,)? &'a mut T>, &'a mut T>;

Expand Down
4 changes: 3 additions & 1 deletion palette_derive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Contains derive macros for the [`palette`](https://crates.io/crates/palette/) cr

## Minimum Supported Rust Version (MSRV)

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.
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.

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.

## License

Expand Down
2 changes: 1 addition & 1 deletion palette_derive/src/meta/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub fn assert_path_meta(meta: &Meta) -> Result<()> {
Ok(())
}

#[derive(PartialEq)]
#[derive(PartialEq, Eq)]
pub struct KeyValuePair {
pub key: Ident,
pub value: Ident,
Expand Down

0 comments on commit 13c298d

Please sign in to comment.