Skip to content

Commit

Permalink
chore(s2n-quic): remove bytes pin and fix new clippy lints (#2291)
Browse files Browse the repository at this point in the history
  • Loading branch information
WesleyRosenblum authored Aug 2, 2024
1 parent 072452e commit 445f73b
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions common/s2n-codec/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

#![allow(unexpected_cfgs)]
#![cfg_attr(not(any(test, feature = "std")), no_std)]

#[cfg(feature = "alloc")]
Expand Down
2 changes: 2 additions & 0 deletions dc/s2n-quic-dc/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

#![allow(unexpected_cfgs)]

pub mod allocator;
pub mod clock;
pub mod congestion;
Expand Down
3 changes: 1 addition & 2 deletions quic/s2n-quic-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ usdt = ["dep:probe"]
atomic-waker = { version = "1", optional = true }
bolero-generator = { version = "0.11", optional = true }
byteorder = { version = "1", default-features = false }
# TODO: Unpin when https://github.com/aws/s2n-quic/issues/2289 is resolved
bytes = { version = "=1.6.1", optional = true, default-features = false }
bytes = { version = "1", optional = true, default-features = false }
crossbeam-utils = { version = "0.8", optional = true }
cfg-if = "1"
hex-literal = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-core/src/application/server_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use bytes::Bytes;
///
/// `ServerName` serves a dual purpose:
/// - It can be converted into [`Bytes`] which supports zero-copy slicing and
/// reference counting.
/// reference counting.
/// - It can be accessed as `&str` so that applications can reason about the string value.
#[derive(Clone, PartialEq, Eq, Hash)]
pub struct ServerName(Bytes);
Expand Down
1 change: 1 addition & 0 deletions quic/s2n-quic-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

#![allow(unexpected_cfgs)]
#![cfg_attr(not(any(test, feature = "std")), no_std)]

#[cfg(feature = "alloc")]
Expand Down
1 change: 1 addition & 0 deletions quic/s2n-quic-platform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//! This module contains abstractions around the platform on which the
//! stack is running

#![allow(unexpected_cfgs)]
#![cfg_attr(not(any(test, feature = "std")), no_std)]

extern crate alloc;
Expand Down
2 changes: 2 additions & 0 deletions quic/s2n-quic-qns/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

#![allow(unexpected_cfgs)]

use structopt::StructOpt;

pub type Error = Box<dyn 'static + std::error::Error + Send + Sync>;
Expand Down
2 changes: 2 additions & 0 deletions quic/s2n-quic-tls/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

#![allow(unexpected_cfgs)]

use s2n_quic_core::application::ServerName;

/// Ensure memory is correctly managed in tests
Expand Down
1 change: 1 addition & 0 deletions quic/s2n-quic-transport/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//! This module contains all main runtime components for receiving and sending
//! data via the QUIC protocol.

#![allow(unexpected_cfgs)]
#![deny(unused_must_use)]
extern crate alloc;

Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic-transport/src/space/handshake_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub type Flag = flag::Flag<HandshakeDoneWriter>;
/// - the handshake is complete and confirmed once the TLS-completes on the Server.
/// - the Server is required to send a HANDSHAKE_DONE frame once the handshake completes.
/// - the Client must wait for a HANDSHAKE_DONE (or an acked 1-rtt packet) to 'Confirm'
/// the handshake.
/// the handshake.
///
/// Note: s2n-quic does not implement the optional 1-rtt acked requirement.
#[derive(Debug, Default)]
Expand Down
2 changes: 1 addition & 1 deletion quic/s2n-quic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
//!```
//!
//! 2. Build a custom s2n-tls TLS provider configured with a FIPS approved
//! [security policy](https://aws.github.io/s2n-tls/usage-guide/ch06-security-policies.html):
//! [security policy](https://aws.github.io/s2n-tls/usage-guide/ch06-security-policies.html):
//!
//!```ignore
//! use s2n_quic::provider::tls::s2n_tls;
Expand Down
4 changes: 2 additions & 2 deletions quic/s2n-quic/src/provider/stateless_reset_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
/// generating stateless reset tokens. This is in accordance with the following requirement:
///
/// > More generally, servers MUST NOT generate a stateless reset
/// if a connection with the corresponding connection ID could
/// be active on any endpoint using the same static key.
/// > if a connection with the corresponding connection ID could
/// > be active on any endpoint using the same static key.
///
/// This may require coordination between endpoints and/or careful setup of load balancing and
/// packet routing, as well as ensuring the connection IDs in use are difficult to guess.
Expand Down

0 comments on commit 445f73b

Please sign in to comment.