Skip to content

Commit

Permalink
Change x..=y syntax to x-y
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Sep 23, 2024
1 parent a80e035 commit b18e8d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions commons/zenoh-protocol/src/core/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,18 +455,18 @@ impl fmt::Debug for ConfigMut<'_> {
///
/// ## Metadata
///
/// - **`priorities`**: a range bounded inclusively below and above (e.g. `2..=4` signifies
/// - **`priorities`**: a range bounded inclusively below and above (e.g. `2-4` signifies
/// priorities 2, 3 and 4). This value is used to select the link used for transmission based on the
/// Priority of the message in question.
///
/// For example, `tcp/localhost:7447?priorities=1..=3` assigns priorities
/// For example, `tcp/localhost:7447?priorities=1-3` assigns priorities
/// [`crate::core::Priority::RealTime`], [`crate::core::Priority::InteractiveHigh`] and
/// [`crate::core::Priority::InteractiveLow`] to the established link.
///
/// - **`reliability`**: either "best_effort" or "reliable". This value is used to select the link
/// used for transmission based on the Reliability of the message in question.
///
/// For example, `tcp/localhost:7447?priorities=6..=7;reliability=best_effort` assigns priorities
/// For example, `tcp/localhost:7447?priorities=6-7;reliability=best_effort` assigns priorities
/// [`crate::core::Priority::DataLow`] and [`crate::core::Priority::Background`], and
/// [`crate::core::Reliability::BestEffort`] to the established link.
#[derive(Clone, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
Expand Down
3 changes: 2 additions & 1 deletion commons/zenoh-protocol/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ impl FromStr for PriorityRange {
type Err = InvalidPriorityRange;

fn from_str(s: &str) -> Result<Self, Self::Err> {
let mut metadata = s.split("..=");
const SEPARATOR: &str = "-";
let mut metadata = s.split(SEPARATOR);

let start = metadata
.next()
Expand Down

0 comments on commit b18e8d5

Please sign in to comment.