Skip to content

Commit

Permalink
chore: bump zenoh version (#177)
Browse files Browse the repository at this point in the history
* chore: bump zenoh version

* chore: update branch
  • Loading branch information
wyfo authored Jul 3, 2024
1 parent e8af917 commit 03e197d
Show file tree
Hide file tree
Showing 23 changed files with 265 additions and 229 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ jobs:
rustup component add rustfmt clippy
- name: Code format check
run: cargo fmt --check

run: cargo fmt --check -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate"
- name: Clippy
run: cargo clippy --all --examples -- -D warnings

Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: local
hooks:
- id: fmt
name: fmt
entry: cargo fmt -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate"
language: system
types: [rust]
54 changes: 27 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions zenoh-bridge-ros2dds/src/bridge_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
// Contributors:
// ZettaScale Zenoh Team, <zenoh@zettascale.tech>
//
use crate::zenoh_args::CommonArgs;
use clap::builder::FalseyValueParser;
use zenoh::config::Config;
use zenoh::prelude::*;
use zenoh::{config::Config, prelude::*};
use zenoh_plugin_trait::Plugin;

use crate::zenoh_args::CommonArgs;

//
// All Bridge arguments
//
Expand Down
9 changes: 6 additions & 3 deletions zenoh-bridge-ros2dds/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
// Contributors:
// ZettaScale Zenoh Team, <zenoh@zettascale.tech>
//
use std::time::{Duration, SystemTime};

use async_liveliness_monitor::LivelinessMonitor;
use bridge_args::BridgeArgs;
use clap::Parser;
use ros_args::RosArgs;
use std::time::{Duration, SystemTime};
use zenoh::config::{Config, ModeDependentValue};
use zenoh::internal::{plugins::PluginsManager, runtime::RuntimeBuilder};
use zenoh::{
config::{Config, ModeDependentValue},
internal::{plugins::PluginsManager, runtime::RuntimeBuilder},
};
use zenoh_plugin_trait::Plugin;

mod bridge_args;
Expand Down
7 changes: 3 additions & 4 deletions zenoh-plugin-ros2dds/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
// Contributors:
// ZettaScale Zenoh Team, <zenoh@zettascale.tech>
//
use std::{env, fmt, time::Duration};

use regex::Regex;
use serde::{de, de::Visitor, ser::SerializeSeq, Deserialize, Deserializer, Serialize, Serializer};
use std::env;
use std::fmt;
use std::time::Duration;
use zenoh::{core::Priority, key_expr::OwnedKeyExpr};
use zenoh::{key_expr::OwnedKeyExpr, qos::Priority};

pub const DEFAULT_NAMESPACE: &str = "/";
pub const DEFAULT_NODENAME: &str = "zenoh_bridge_ros2dds";
Expand Down
12 changes: 4 additions & 8 deletions zenoh-plugin-ros2dds/src/dds_discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,13 @@
// Contributors:
// ZettaScale Zenoh Team, <zenoh@zettascale.tech>
//
use cyclors::qos::Qos;
use cyclors::*;
use std::{ffi::CStr, fmt, mem::MaybeUninit, sync::Arc};

use cyclors::{qos::Qos, *};
use flume::Sender;
use serde::{Deserialize, Serialize};
use std::ffi::CStr;
use std::fmt;
use std::mem::MaybeUninit;
use std::sync::Arc;

use crate::dds_types::TypeInfo;
use crate::gid::Gid;
use crate::{dds_types::TypeInfo, gid::Gid};

const MAX_SAMPLES: usize = 32;

Expand Down
11 changes: 6 additions & 5 deletions zenoh-plugin-ros2dds/src/dds_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
// ZettaScale Zenoh Team, <zenoh@zettascale.tech>
//

use std::{fmt, slice};

use cyclors::*;
use std::fmt;
use std::slice;
use zenoh::bytes::ZBytes;
use zenoh::encoding::Encoding;
use zenoh::internal::Value;
use zenoh::{
bytes::{Encoding, ZBytes},
internal::Value,
};

use crate::dds_utils::ddsrt_iov_len_to_usize;

Expand Down
13 changes: 7 additions & 6 deletions zenoh-plugin-ros2dds/src/dds_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@
// Contributors:
// ZettaScale Zenoh Team, <zenoh@zettascale.tech>
//
use async_std::task;
use cyclors::{
qos::{History, HistoryKind, Qos},
*,
};
use serde::Serializer;
use std::{
ffi::{CStr, CString},
mem::MaybeUninit,
sync::{atomic::AtomicI32, Arc},
time::Duration,
};

use async_std::task;
use cyclors::{
qos::{History, HistoryKind, Qos},
*,
};
use serde::Serializer;

use crate::{
dds_types::{DDSRawSample, TypeInfo},
gid::Gid,
Expand Down
Loading

0 comments on commit 03e197d

Please sign in to comment.