Skip to content

Commit

Permalink
misc: remove dead_code allows
Browse files Browse the repository at this point in the history
Now that everything is wired up, remove the temporary
`#[allow(dead_code)]` annotations added in prev. commits.
  • Loading branch information
cpu committed Mar 19, 2024
1 parent 80e9d86 commit c0bd6e6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 9 deletions.
2 changes: 0 additions & 2 deletions rustls/src/client/client_conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ pub enum Tls12Resumption {
///
/// Note: differs from the protocol-encoded EchConfig (`EchConfigMsg`).
#[derive(Clone, Debug)]
#[allow(dead_code)] // TODO(@cpu): remove in subsequent commit.
pub struct EchConfig {
/// The provider to use for HPKE operations.
pub(crate) hpke_provider: &'static dyn HpkeProvider,
Expand Down Expand Up @@ -557,7 +556,6 @@ impl EchConfig {
})
}

#[allow(dead_code)] // TODO(@cpu): remove in subsequent commit.
pub(crate) fn hpke_info(&self) -> Vec<u8> {
// "tls ech" || 0x00 || ECHConfig
// https://datatracker.ietf.org/doc/html/draft-ietf-tls-esni-17#section-6.1
Expand Down
1 change: 0 additions & 1 deletion rustls/src/client/ech.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![allow(dead_code)] // TODO(@cpu): remove in subsequent commit.
use alloc::boxed::Box;
use alloc::vec;
use alloc::vec::Vec;
Expand Down
4 changes: 0 additions & 4 deletions rustls/src/msgs/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,6 @@ impl HelloRetryRequest {
}
}

#[allow(dead_code)] // TODO(@cpu): remove in subsequent commits.
pub(crate) fn ech_retry_request(&self) -> Option<&Vec<u8>> {
let ext = self.find_extension(ExtensionType::EncryptedClientHello)?;
match *ext {
Expand Down Expand Up @@ -1204,7 +1203,6 @@ pub(crate) enum Encoding {
/// Standard RFC 8446 encoding.
Standard,
/// Encoding for ECH confirmation.
#[allow(dead_code)] // TODO(@cpu): Remove in subsequent commits.
EchConfirmation,
}

Expand Down Expand Up @@ -1896,7 +1894,6 @@ pub(crate) trait HasServerExtensions {
}
}

#[allow(dead_code)]
fn server_ech_extension(&self) -> Option<ServerEncryptedClientHello> {
let ext = self.find_extension(ExtensionType::EncryptedClientHello)?;
match ext {
Expand Down Expand Up @@ -2599,7 +2596,6 @@ pub struct EchConfigContents {
pub extensions: Vec<EchConfigExtension>,
}

#[allow(dead_code)] // TODO(@cpu): Remove in subsequent commits.
impl EchConfigContents {
/// Returns true if there is more than one extension of a given
/// type.
Expand Down
2 changes: 0 additions & 2 deletions rustls/src/tls13/key_schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ impl KeyScheduleHandshakeStart {
new
}

#[allow(dead_code)] // TODO(@cpu): remove in subsequent commit.
pub(crate) fn server_ech_confirmation_secret(
&mut self,
client_hello_inner_random: &[u8],
Expand Down Expand Up @@ -805,7 +804,6 @@ fn hkdf_expand_label_slice(
})
}

#[allow(dead_code)] // TODO(@cpu): remove in subsequent commit.
pub(crate) fn server_ech_hrr_confirmation_secret(
hkdf_provider: &'static dyn Hkdf,
client_hello_inner_random: &[u8],
Expand Down

0 comments on commit c0bd6e6

Please sign in to comment.