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 Jan 2, 2024
1 parent d9f2afd commit a3444ce
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 @@ -421,7 +421,6 @@ pub enum Tls12Resumption {
///
/// Note: differs from the protocol-encoded EchConfig (`EchConfigMsg`).
#[derive(Clone, Debug)]

Check warning on line 423 in rustls/src/client/client_conn.rs

View check run for this annotation

Codecov / codecov/patch

rustls/src/client/client_conn.rs#L423

Added line #L423 was not covered by tests
#[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 @@ -495,7 +494,6 @@ impl EchConfig {
})
}

Check warning on line 495 in rustls/src/client/client_conn.rs

View check run for this annotation

Codecov / codecov/patch

rustls/src/client/client_conn.rs#L490-L495

Added lines #L490 - L495 were not covered by tests

#[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
2 changes: 0 additions & 2 deletions rustls/src/hash_hs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ impl HandshakeHashBuffer {

/// Fork the hash computation, producing another context that has the
/// same prefix as this one.
#[allow(dead_code)] // TODO(@cpu): remove in subsequent commit.
pub(crate) fn get_fork(&self) -> Self {
Self {
buffer: self.buffer.clone(),
Expand Down Expand Up @@ -134,7 +133,6 @@ impl HandshakeHash {

/// Fork the hash computation, producing another context that has the
/// same prefix as this one.
#[allow(dead_code)] // TODO(@cpu): remove in subsequent commit.
pub(crate) fn get_fork(&self) -> Self {
Self {
provider: self.provider,
Expand Down
3 changes: 0 additions & 3 deletions rustls/src/msgs/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,6 @@ impl HelloRetryRequest {
}
}

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

Expand Down Expand Up @@ -2437,7 +2435,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 @@ -213,7 +213,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 @@ -822,7 +821,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 a3444ce

Please sign in to comment.