Skip to content

Commit

Permalink
chore: FF now using Rust 1.74.0 (#1639)
Browse files Browse the repository at this point in the history
* chore: FF now using Rust 1.74.0

This should address the CI build errors with `clap`.

* Remove clippy allows
  • Loading branch information
larseggert authored Feb 9, 2024
1 parent e7277f9 commit 303d9fd
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
rust-toolchain: [1.70.0, stable, nightly]
# Don't increase beyond what Firefox is currently using:
# https://firefox-source-docs.mozilla.org/writing-rust-code/update-policy.html#schedule
rust-toolchain: [1.74.0, stable, nightly]
type: [debug]
include:
- os: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ repository = "https://github.com/mozilla/neqo/"
authors = ["The Neqo Authors <[email protected]>"]
version = "0.7.0"
edition = "2018"
rust-version = "1.70.0"
license = "MIT OR Apache-2.0"
# Don't increase beyond what Firefox is currently using:
# https://firefox-source-docs.mozilla.org/writing-rust-code/update-policy.html#schedule
rust-version = "1.74.0"
2 changes: 0 additions & 2 deletions neqo-crypto/src/ech.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ pub fn generate_keys() -> Res<(PrivateKey, PublicKey)> {

// If we have tracing on, try to ensure that key data can be read.
let insensitive_secret_ptr = if log::log_enabled!(log::Level::Trace) {
#[allow(clippy::useless_conversion)] // TODO: Remove when we bump the MSRV to 1.74.0.
unsafe {
p11::PK11_GenerateKeyPairWithOpFlags(
*slot,
Expand All @@ -131,7 +130,6 @@ pub fn generate_keys() -> Res<(PrivateKey, PublicKey)> {
};
assert_eq!(insensitive_secret_ptr.is_null(), public_ptr.is_null());
let secret_ptr = if insensitive_secret_ptr.is_null() {
#[allow(clippy::useless_conversion)] // TODO: Remove when we bump the MSRV to 1.74.0.
unsafe {
p11::PK11_GenerateKeyPairWithOpFlags(
*slot,
Expand Down
1 change: 0 additions & 1 deletion neqo-crypto/src/hkdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ pub fn import_key(version: Version, buf: &[u8]) -> Res<SymKey> {
return Err(Error::UnsupportedVersion);
}
let slot = Slot::internal()?;
#[allow(clippy::useless_conversion)] // TODO: Remove when we bump the MSRV to 1.74.0.
let key_ptr = unsafe {
PK11_ImportDataKey(
*slot,
Expand Down
5 changes: 0 additions & 5 deletions neqo-crypto/src/hp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ impl HpKey {
let l = label.as_bytes();
let mut secret: *mut PK11SymKey = null_mut();

#[allow(clippy::useless_conversion)] // TODO: Remove when we bump the MSRV to 1.74.0.
let (mech, key_size) = match cipher {
TLS_AES_128_GCM_SHA256 => (CK_MECHANISM_TYPE::from(CKM_AES_ECB), 16),
TLS_AES_256_GCM_SHA384 => (CK_MECHANISM_TYPE::from(CKM_AES_ECB), 32),
Expand Down Expand Up @@ -104,8 +103,6 @@ impl HpKey {

let res = match cipher {
TLS_AES_128_GCM_SHA256 | TLS_AES_256_GCM_SHA384 => {
// TODO: Remove when we bump the MSRV to 1.74.0.
#[allow(clippy::useless_conversion)]
let context_ptr = unsafe {
PK11_CreateContextBySymKey(
mech,
Expand Down Expand Up @@ -181,8 +178,6 @@ impl HpKey {
};
let mut output_len: c_uint = 0;
let mut param_item = Item::wrap_struct(&params);
// TODO: Remove when we bump the MSRV to 1.74.0.
#[allow(clippy::useless_conversion)]
secstatus_to_res(unsafe {
PK11_Encrypt(
**key,
Expand Down
1 change: 0 additions & 1 deletion neqo-crypto/src/p11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ impl PrivateKey {
/// When the values are too large to fit. So never.
pub fn key_data(&self) -> Res<Vec<u8>> {
let mut key_item = Item::make_empty();
#[allow(clippy::useless_conversion)] // TODO: Remove when we bump the MSRV to 1.74.0.
secstatus_to_res(unsafe {
PK11_ReadRawAttribute(
PK11ObjectType::PK11_TypePrivKey,
Expand Down
1 change: 0 additions & 1 deletion neqo-transport/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,6 @@ impl Connection {
/// During connection setup, the first path needs to be setup.
/// This uses the connection IDs that were provided during the handshake
/// to setup that path.
#[allow(clippy::or_fun_call)] // Remove when MSRV >= 1.59
fn setup_handshake_path(&mut self, path: &PathRef, now: Instant) {
self.paths.make_permanent(
path,
Expand Down

0 comments on commit 303d9fd

Please sign in to comment.