Skip to content

Commit

Permalink
Merge branch 'selector_rework3' of github.com:eclipse-zenoh/zenoh int…
Browse files Browse the repository at this point in the history
…o selector_rework3
  • Loading branch information
milyin committed Jun 10, 2024
2 parents 2f01adc + 634f09f commit b84bd90
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions zenoh/src/api/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,10 +638,13 @@ impl From<&str> for Encoding {
}

// Everything before `;` may be mapped to a known id
let (id, schema) = t.split_once(Encoding::SCHEMA_SEP).unwrap_or((t, ""));
let (id, mut schema) = t.split_once(Encoding::SCHEMA_SEP).unwrap_or((t, ""));
if let Some(id) = Encoding::STR_TO_ID.get(id).copied() {
inner.id = id;
};
// if id is not recognized, e.g. `t == "my_encoding"`, put it in the schema
} else {
schema = t;
}
if !schema.is_empty() {
inner.schema = Some(ZSlice::from(schema.to_string().into_bytes()));
}
Expand Down
1 change: 1 addition & 0 deletions zenoh/src/api/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ use super::{
publisher::Publisher,
publisher::{MatchingListenerState, MatchingStatus},
sample::SourceInfo,
selector::TIME_RANGE_KEY,
};
use crate::{
api::selector::PredefinedParameters,
Expand Down
2 changes: 1 addition & 1 deletion zenohd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tracing = {workspace = true}
tracing-subscriber = {workspace = true}
tracing-loki = {workspace = true, optional = true }
url = {workspace = true, optional = true }
zenoh = { workspace = true, features = ["unstable", "plugins"] }
zenoh = { workspace = true, features = ["unstable", "internal", "plugins"] }

[dev-dependencies]
rand = { workspace = true, features = ["default"] }
Expand Down

0 comments on commit b84bd90

Please sign in to comment.