Skip to content

Commit

Permalink
bump msrv to 1.65
Browse files Browse the repository at this point in the history
  • Loading branch information
baloo committed Dec 15, 2022
1 parent 72db708 commit 316036c
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 45 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/der.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
# 32-bit Linux
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.60.0 # MSRV
rust: 1.65.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
Expand All @@ -62,7 +62,7 @@ jobs:
# 64-bit Linux
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.60.0 # MSRV
rust: 1.65.0 # MSRV
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
Expand All @@ -71,7 +71,7 @@ jobs:
# 64-bit Windows
#- target: x86_64-pc-windows-msvc
# platform: windows-latest
# rust: 1.60.0 # MSRV
# rust: 1.65.0 # MSRV
#- target: x86_64-pc-windows-msvc
# platform: windows-latest
# rust: stable
Expand All @@ -93,7 +93,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkcs1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -53,7 +53,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkcs5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -52,7 +52,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkcs7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -51,7 +51,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkcs8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -54,7 +54,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sec1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -53,7 +53,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/spki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -52,7 +52,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/x509-cert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -52,7 +52,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 0 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion der/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const-oid = { version = "=0.10.0-pre", optional = true, path = "../const-oid" }
der_derive = { version = "=0.7.0-pre", optional = true, path = "derive" }
flagset = { version = "0.4.3", optional = true }
pem-rfc7468 = { version = "0.6", optional = true, path = "../pem-rfc7468" }
rustversion = "1.0"
time = { version = "0.3.4", optional = true, default-features = false }
zeroize = { version = "1.5", optional = true, default-features = false, features = ["alloc"] }

Expand Down
1 change: 0 additions & 1 deletion der/src/asn1/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ where
}
}

#[rustversion::since(1.65)] // Generic associated types support is required
#[cfg(feature = "alloc")]
mod feature_alloc {
use super::*;
Expand Down
1 change: 0 additions & 1 deletion der/src/asn1/bit_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ impl ValueOrd for BitString {
}
}

#[rustversion::since(1.65)] // Generic associated types support is required
#[cfg(feature = "alloc")]
mod feature_alloc {
use super::*;
Expand Down
13 changes: 1 addition & 12 deletions der/src/referenced.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! A module for working with referenced data.

/// A trait for borrowing data from an owned struct
#[rustversion::since(1.65)] // Generic associated types support is required
pub trait OwnedToRef {
/// The resulting type referencing back to Self
type Borrowed<'a>
Expand All @@ -15,7 +14,6 @@ pub trait OwnedToRef {
/// A trait for cloning a referenced structure and getting owned objects
///
/// This is the pendant to [`OwnedToRef`]
#[rustversion::since(1.65)] // Generic associated types support is required
pub trait RefToOwned<'a> {
/// The resulting type after obtaining ownership.
type Owned: OwnedToRef<Borrowed<'a> = Self>
Expand All @@ -26,26 +24,17 @@ pub trait RefToOwned<'a> {
fn to_owned(&self) -> Self::Owned;
}

#[rustversion::since(1.65)] // Generic associated types support is required
impl<T> OwnedToRef for Option<T>
where
T: OwnedToRef,
{
// TODO: when upgrading to rust 1.65, we can use the new syntax
// MSRV 1.60 requires us to use the old syntax
#[allow(unknown_lints)]
#[allow(deprecated_where_clause_location)]
type Borrowed<'a>
where
T: 'a,
= Option<T::Borrowed<'a>>;
type Borrowed<'a> = Option<T::Borrowed<'a>> where T: 'a;

fn to_ref(&self) -> Self::Borrowed<'_> {
self.as_ref().map(|o| o.to_ref())
}
}

#[rustversion::since(1.65)] // Generic associated types support is required
impl<'a, T> RefToOwned<'a> for Option<T>
where
T: RefToOwned<'a> + 'a,
Expand Down
1 change: 0 additions & 1 deletion spki/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ rust-version = "1.57"

[dependencies]
der = { version = "=0.7.0-pre", features = ["oid"], path = "../der" }
rustversion = "1.0"

# Optional dependencies
sha2 = { version = "0.10", optional = true, default-features = false }
Expand Down
1 change: 0 additions & 1 deletion spki/src/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ impl<'a> AlgorithmIdentifierRef<'a> {
}
}

#[rustversion::since(1.65)] // Generic associated types support is required
#[cfg(feature = "alloc")]
mod feature_alloc {
use super::*;
Expand Down
1 change: 0 additions & 1 deletion spki/src/spki.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ impl<Params, Key> PemLabel for SubjectPublicKeyInfo<Params, Key> {
const PEM_LABEL: &'static str = "PUBLIC KEY";
}

#[rustversion::since(1.65)] // Generic associated types support is required
#[cfg(feature = "alloc")]
mod feature_alloc {
use super::*;
Expand Down

0 comments on commit 316036c

Please sign in to comment.