Skip to content

Commit

Permalink
Fix use and unstable visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Mallets committed Apr 5, 2024
1 parent 8f8eb25 commit eb1a80a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
5 changes: 4 additions & 1 deletion zenoh/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ pub(crate) mod common {
pub use zenoh_protocol::core::{CongestionControl, Reliability, WhatAmI};

pub use crate::sample::builder::{
QoSBuilderTrait, SampleBuilderTrait, TimestampBuilderTrait, ValueBuilderTrait,
QoSBuilderTrait, TimestampBuilderTrait, ValueBuilderTrait,
};

#[zenoh_macros::unstable]
pub use crate::sample::builder::SampleBuilderTrait;
}

/// Prelude to import when using Zenoh's sync API.
Expand Down
3 changes: 1 addition & 2 deletions zenoh/src/queryable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ use crate::encoding::Encoding;
use crate::handlers::{locked, DefaultHandler};
use crate::net::primitives::Primitives;
use crate::prelude::*;
use crate::sample::builder::SampleBuilder;
use crate::sample::{QoSBuilder, SourceInfo};
use crate::Id;
use crate::SessionRef;
use crate::Undeclarable;
#[cfg(feature = "unstable")]
use crate::{query::ReplyKeyExpr, sample::Attachment};
use crate::{query::ReplyKeyExpr, sample::Attachment, sample::builder::SampleBuilder};
use std::fmt;
use std::future::Ready;
use std::ops::Deref;
Expand Down
8 changes: 3 additions & 5 deletions zenoh/src/sample/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@
use std::marker::PhantomData;

#[cfg(feature = "unstable")]
use crate::sample::Attachment;
use crate::sample::QoS;
use crate::sample::QoSBuilder;
#[cfg(feature = "unstable")]
use crate::sample::SourceInfo;
use crate::sample::{Attachment, SourceInfo};
use crate::sample::{QoS, QoSBuilder};
use crate::Encoding;
use crate::KeyExpr;
use crate::Payload;
Expand Down Expand Up @@ -47,6 +44,7 @@ pub trait TimestampBuilderTrait {
fn timestamp<T: Into<Option<Timestamp>>>(self, timestamp: T) -> Self;
}

#[zenoh_macros::unstable]
pub trait SampleBuilderTrait {
/// Attach source information
#[zenoh_macros::unstable]
Expand Down
1 change: 1 addition & 0 deletions zenoh/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ use crate::Priority;
use crate::Sample;
use crate::SampleKind;
use crate::Selector;
#[cfg(feature = "unstable")]
use crate::SourceInfo;
use crate::Value;
use log::{error, trace, warn};
Expand Down
1 change: 0 additions & 1 deletion zenoh/tests/qos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
//
use std::time::Duration;
use zenoh::prelude::r#async::*;
use zenoh::sample::builder::QoSBuilderTrait;
use zenoh::{publication::Priority, SessionDeclarations};
use zenoh_core::ztimeout;

Expand Down
1 change: 0 additions & 1 deletion zenoh/tests/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use std::time::Duration;
use tokio_util::{sync::CancellationToken, task::TaskTracker};
use zenoh::config::{Config, ModeDependentValue};
use zenoh::prelude::r#async::*;
use zenoh::sample::builder::QoSBuilderTrait;
use zenoh::Result;
use zenoh_core::ztimeout;
use zenoh_protocol::core::{WhatAmI, WhatAmIMatcher};
Expand Down

0 comments on commit eb1a80a

Please sign in to comment.