Skip to content

Commit

Permalink
Remove remaining deprecated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Sep 20, 2024
1 parent 94ba6f3 commit 4e058de
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 91 deletions.
9 changes: 0 additions & 9 deletions commons/zenoh-buffers/src/zslice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,6 @@ pub struct ZSlice {
}

impl ZSlice {
#[deprecated(since = "1.0.0", note = "use `new` instead")]
pub fn make(
buf: Arc<dyn ZSliceBuffer>,
start: usize,
end: usize,
) -> Result<ZSlice, Arc<dyn ZSliceBuffer>> {
Self::new(buf, start, end)
}

#[inline]
pub fn new(
buf: Arc<dyn ZSliceBuffer>,
Expand Down
3 changes: 1 addition & 2 deletions plugins/zenoh-plugin-storage-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ use zenoh::{
zlock, LibLoader,
},
key_expr::{keyexpr, KeyExpr, OwnedKeyExpr},
prelude::Wait,
session::Session,
Result as ZResult,
Result as ZResult, Wait,
};
use zenoh_backend_traits::{
config::{ConfigDiff, PluginConfig, StorageConfig, VolumeConfig},
Expand Down
3 changes: 1 addition & 2 deletions zenoh-ext/src/publication_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ use std::{
use zenoh::{
internal::{bail, runtime::ZRuntime, ResolveFuture, TerminatableTask},
key_expr::{keyexpr, KeyExpr, OwnedKeyExpr},
prelude::Wait,
pubsub::FlumeSubscriber,
query::{Query, Queryable, ZenohParameters},
sample::{Locality, Sample},
Error, Resolvable, Resolve, Result as ZResult, Session,
Error, Resolvable, Resolve, Result as ZResult, Session, Wait,
};

/// The builder of PublicationCache, allowing to configure it.
Expand Down
70 changes: 1 addition & 69 deletions zenoh-ext/src/querying_subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,15 @@ use std::{
};

#[cfg(feature = "unstable")]
use zenoh::qos::Reliability;
use zenoh::{
handlers::{locked, Callback, DefaultHandler, IntoHandler},
internal::zlock,
key_expr::KeyExpr,
prelude::Wait,
pubsub::Subscriber,
query::{QueryConsolidation, QueryTarget, ReplyKeyExpr, Selector},
sample::{Locality, Sample, SampleBuilder},
time::Timestamp,
Error, Resolvable, Resolve, Result as ZResult, Session,
Error, Resolvable, Resolve, Result as ZResult, Session, Wait,
};

use crate::ExtractSample;
Expand Down Expand Up @@ -129,39 +127,6 @@ impl<'a, 'b, KeySpace> QueryingSubscriberBuilder<'a, 'b, KeySpace, DefaultHandle
}

impl<'b, Handler> QueryingSubscriberBuilder<'_, 'b, crate::UserSpace, Handler> {
/// Change the subscription reliability.
#[cfg(feature = "unstable")]
#[deprecated(
since = "1.0.0",
note = "please use `reliability` on `declare_publisher` or `put`"
)]
#[allow(unused_mut, unused_variables)]
pub fn reliability(mut self, reliability: Reliability) -> Self {
self
}

/// Change the subscription reliability to Reliable.
#[cfg(feature = "unstable")]
#[deprecated(
since = "1.0.0",
note = "please use `reliability` on `declare_publisher` or `put`"
)]
#[allow(unused_mut)]
pub fn reliable(mut self) -> Self {
self
}

/// Change the subscription reliability to BestEffort.
#[cfg(feature = "unstable")]
#[deprecated(
since = "1.0.0",
note = "please use `reliability` on `declare_publisher` or `put`"
)]
#[allow(unused_mut)]
pub fn best_effort(mut self) -> Self {
self
}

///
///
/// Restrict the matching publications that will be receive by this [`Subscriber`]
Expand Down Expand Up @@ -504,39 +469,6 @@ impl<
where
TryIntoSample: ExtractSample,
{
/// Change the subscription reliability.
#[cfg(feature = "unstable")]
#[deprecated(
since = "1.0.0",
note = "please use `reliability` on `declare_publisher` or `put`"
)]
#[allow(unused_mut, unused_variables)]
pub fn reliability(mut self, reliability: Reliability) -> Self {
self
}

/// Change the subscription reliability to Reliable.
#[cfg(feature = "unstable")]
#[deprecated(
since = "1.0.0",
note = "please use `reliability` on `declare_publisher` or `put`"
)]
#[allow(unused_mut)]
pub fn reliable(mut self) -> Self {
self
}

/// Change the subscription reliability to BestEffort.
#[cfg(feature = "unstable")]
#[deprecated(
since = "1.0.0",
note = "please use `reliability` on `declare_publisher` or `put`"
)]
#[allow(unused_mut)]
pub fn best_effort(mut self) -> Self {
self
}

/// Restrict the matching publications that will be receive by this [`FetchingSubscriber`]
/// to the ones that have the given [`Locality`](Locality).
#[zenoh_macros::unstable]
Expand Down
6 changes: 0 additions & 6 deletions zenoh/src/api/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -681,12 +681,6 @@ impl Session {
}
}
}

/// Wrap the session into an `Arc`.
#[deprecated(since = "1.0.0", note = "use `Session` directly instead")]
pub fn into_arc(self) -> Arc<Session> {
Arc::new(self)
}
}

impl Session {
Expand Down
3 changes: 0 additions & 3 deletions zenoh/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ pub use crate::{
session::{open, Session},
};

#[deprecated(since = "1.0.0")]
pub mod prelude;

/// [Key expression](https://github.com/eclipse-zenoh/roadmap/blob/main/rfcs/ALL/Key%20Expressions.md) are Zenoh's address space.
///
/// In Zenoh, operations are performed on keys. To allow addressing multiple keys with a single operation, we use Key Expressions (KE).
Expand Down

0 comments on commit 4e058de

Please sign in to comment.