mirror of https://github.com/ctz/rustls
Replace `doc(hidden)` with `pub(crate)` where those semantics are intended.
I think these uses of `doc(hidden)` are trying to implement `pub(crate)` semantics. Perhaps it was done this way a long time ago when `pub(crate)` wasn't a think. This change causes an `unreachable_pub` warning for `PlaintextSink`, so make that `pub(crate)` too. Some external users might be using these even though they probably shouldn't be, so this is technically a breaking change.
This commit is contained in:
parent
e1731db6b7
commit
6dfa67809d
|
@ -176,11 +176,10 @@ impl ClientConfig {
|
|||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
/// We support a given TLS version if it's quoted in the configured
|
||||
/// versions *and* at least one ciphersuite for this version is
|
||||
/// also configured.
|
||||
pub fn supports_version(&self, v: ProtocolVersion) -> bool {
|
||||
pub(crate) fn supports_version(&self, v: ProtocolVersion) -> bool {
|
||||
self.versions.contains(v)
|
||||
&& self
|
||||
.cipher_suites
|
||||
|
|
|
@ -303,7 +303,7 @@ impl<'a> io::Read for Reader<'a> {
|
|||
|
||||
/// Internal trait implemented by the [`ServerConnection`]/[`ClientConnection`]
|
||||
/// allowing them to be the subject of a [`Writer`].
|
||||
pub trait PlaintextSink {
|
||||
pub(crate) trait PlaintextSink {
|
||||
fn write(&mut self, buf: &[u8]) -> io::Result<usize>;
|
||||
fn write_vectored(&mut self, bufs: &[io::IoSlice<'_>]) -> io::Result<usize>;
|
||||
fn flush(&mut self) -> io::Result<()>;
|
||||
|
@ -337,8 +337,7 @@ impl<'a> Writer<'a> {
|
|||
///
|
||||
/// This is not an external interface. Get one of these objects
|
||||
/// from [`Connection::writer`].
|
||||
#[doc(hidden)]
|
||||
pub fn new(sink: &'a mut dyn PlaintextSink) -> Writer<'a> {
|
||||
pub(crate) fn new(sink: &'a mut dyn PlaintextSink) -> Writer<'a> {
|
||||
Writer { sink }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -309,11 +309,10 @@ impl ServerConfig {
|
|||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
/// We support a given TLS version if it's quoted in the configured
|
||||
/// versions *and* at least one ciphersuite for this version is
|
||||
/// also configured.
|
||||
pub fn supports_version(&self, v: ProtocolVersion) -> bool {
|
||||
pub(crate) fn supports_version(&self, v: ProtocolVersion) -> bool {
|
||||
self.versions.contains(v)
|
||||
&& self
|
||||
.cipher_suites
|
||||
|
|
Loading…
Reference in New Issue