-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,8 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use std::time::Duration; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::*; | ||
|
||
use zenoh::{config::Config, prelude::*}; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,9 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use std::convert::TryFrom; | ||
use std::time::Duration; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::*; | ||
use std::{convert::TryFrom, time::Duration}; | ||
|
||
use zenoh::{config::Config, prelude::*}; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,12 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use lazy_static::lazy_static; | ||
use std::{ | ||
collections::LinkedList, | ||
sync::{Arc, Mutex}, | ||
}; | ||
|
||
use lazy_static::lazy_static; | ||
use zenoh_result::{zerror, ZResult}; | ||
|
||
use super::{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,12 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use lazy_static::lazy_static; | ||
use std::{ | ||
collections::BTreeMap, | ||
sync::{Arc, Mutex}, | ||
}; | ||
|
||
use lazy_static::lazy_static; | ||
use zenoh_result::{zerror, ZResult}; | ||
|
||
use super::{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,12 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use lazy_static::lazy_static; | ||
use std::{ | ||
collections::BTreeSet, | ||
sync::{Arc, Mutex}, | ||
}; | ||
|
||
use lazy_static::lazy_static; | ||
use zenoh_result::{zerror, ZResult}; | ||
|
||
use super::{allocated_watchdog::AllocatedWatchdog, descriptor::OwnedDescriptor, segment::Segment}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,15 +11,13 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use std::convert::TryInto; | ||
use std::fmt; | ||
|
||
use super::common::seq_num::SeqNum; | ||
use super::core::u64; | ||
use std::{convert::TryInto, fmt}; | ||
|
||
use zenoh_result::{ZError, ZErrorKind, ZResult}; | ||
use zenoh_util::zerror; | ||
|
||
use super::{common::seq_num::SeqNum, core::u64}; | ||
|
||
pub(super) struct ReliabilityQueue<T> { | ||
sn: SeqNum, | ||
index: usize, | ||
|
@@ -249,9 +247,10 @@ impl<T: fmt::Debug> fmt::Debug for ReliabilityQueue<T> { | |
|
||
#[cfg(test)] | ||
mod tests { | ||
use super::*; | ||
use rand::{thread_rng, Rng}; | ||
|
||
use super::*; | ||
|
||
#[test] | ||
fn reliability_queue_simple() { | ||
let size = 2; | ||
|