mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-06 08:02:18 +00:00
feat(core): deprecate OptionalUpgrade
This is dead-code, we don't use it in our codebase. I am suggesting to remove it because it creates an unnecessary API surface. Related: https://github.com/libp2p/rust-libp2p/pull/3747. Related: https://github.com/libp2p/rust-libp2p/issues/3271. Pull-Request: #3806.
This commit is contained in:
parent
9681116b02
commit
e5dbeb3e08
@ -7,8 +7,12 @@
|
|||||||
- Deprecate `{In,Out}boundUpgradeExt`, as they are not used in rust-libp2p.
|
- Deprecate `{In,Out}boundUpgradeExt`, as they are not used in rust-libp2p.
|
||||||
See [PR 3807].
|
See [PR 3807].
|
||||||
|
|
||||||
|
- Deprecate `OptionalUpgrade` without replacement.
|
||||||
|
See [PR 3806].
|
||||||
|
|
||||||
[PR 3747]: https://github.com/libp2p/rust-libp2p/pull/3747
|
[PR 3747]: https://github.com/libp2p/rust-libp2p/pull/3747
|
||||||
[PR 3807]: https://github.com/libp2p/rust-libp2p/pull/3807
|
[PR 3807]: https://github.com/libp2p/rust-libp2p/pull/3807
|
||||||
|
[PR 3806]: https://github.com/libp2p/rust-libp2p/pull/3806
|
||||||
|
|
||||||
## 0.39.1
|
## 0.39.1
|
||||||
|
|
||||||
|
@ -77,17 +77,17 @@ pub use self::{
|
|||||||
apply::{apply, apply_inbound, apply_outbound, InboundUpgradeApply, OutboundUpgradeApply},
|
apply::{apply, apply_inbound, apply_outbound, InboundUpgradeApply, OutboundUpgradeApply},
|
||||||
denied::DeniedUpgrade,
|
denied::DeniedUpgrade,
|
||||||
error::UpgradeError,
|
error::UpgradeError,
|
||||||
optional::OptionalUpgrade,
|
|
||||||
pending::PendingUpgrade,
|
pending::PendingUpgrade,
|
||||||
ready::ReadyUpgrade,
|
ready::ReadyUpgrade,
|
||||||
select::SelectUpgrade,
|
select::SelectUpgrade,
|
||||||
transfer::{read_length_prefixed, read_varint, write_length_prefixed, write_varint},
|
transfer::{read_length_prefixed, read_varint, write_length_prefixed, write_varint},
|
||||||
};
|
};
|
||||||
pub use crate::Negotiated;
|
pub use crate::Negotiated;
|
||||||
pub use multistream_select::{NegotiatedComplete, NegotiationError, ProtocolError, Version};
|
|
||||||
|
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
pub use map::{MapInboundUpgrade, MapInboundUpgradeErr, MapOutboundUpgrade, MapOutboundUpgradeErr};
|
pub use map::{MapInboundUpgrade, MapInboundUpgradeErr, MapOutboundUpgrade, MapOutboundUpgradeErr};
|
||||||
|
pub use multistream_select::{NegotiatedComplete, NegotiationError, ProtocolError, Version};
|
||||||
|
#[allow(deprecated)]
|
||||||
|
pub use optional::OptionalUpgrade;
|
||||||
|
|
||||||
/// Types serving as protocol names.
|
/// Types serving as protocol names.
|
||||||
///
|
///
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
#![allow(deprecated)]
|
||||||
|
|
||||||
use crate::upgrade::{InboundUpgrade, OutboundUpgrade, UpgradeInfo};
|
use crate::upgrade::{InboundUpgrade, OutboundUpgrade, UpgradeInfo};
|
||||||
|
|
||||||
/// Upgrade that can be disabled at runtime.
|
/// Upgrade that can be disabled at runtime.
|
||||||
@ -25,6 +27,9 @@ use crate::upgrade::{InboundUpgrade, OutboundUpgrade, UpgradeInfo};
|
|||||||
/// Wraps around an `Option<T>` and makes it available or not depending on whether it contains or
|
/// Wraps around an `Option<T>` and makes it available or not depending on whether it contains or
|
||||||
/// not an upgrade.
|
/// not an upgrade.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
#[deprecated(
|
||||||
|
note = "Will be removed without replacement because it is not used within rust-libp2p."
|
||||||
|
)]
|
||||||
pub struct OptionalUpgrade<T>(Option<T>);
|
pub struct OptionalUpgrade<T>(Option<T>);
|
||||||
|
|
||||||
impl<T> OptionalUpgrade<T> {
|
impl<T> OptionalUpgrade<T> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user