Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(s2n-quic): remove bytes pin and fix new clippy lints #2291

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one we probably could enable, since we do have a build.rs for this crate and I don't think cargo warns on old versions if you emit that directive?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it, but it does have this warning:

warning: cargo:rustc-check-cfg requires -Zcheck-cfg=output flag

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lame

#![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
Loading