Skip to content

Commit

Permalink
deps: bump Rust toolchain to 1.75.0
Browse files Browse the repository at this point in the history
This commit prepares upgrading the version of Zenoh to 1.0.4 by bumping
the version of the Rust toolchain to 1.75.0.

As with every new version of Rust, new Clippy warnings are introduced.
This commit also fixes them.

* rust-toolchain.toml: bump the toolchain to 1.75.0.
* zenoh-flow-descriptors/src/flattened/mod.rs: removed the unused
  exports.
* zenoh-flow-nodes/src/io/outputs.rs: use `or_default`.
* zenoh-flow-records/src/dataflow.rs: use `or_default`.

Signed-off-by: Julien Loudet <julien.loudet@zettascale.tech>
  • Loading branch information
J-Loudet committed Dec 13, 2024
1 parent 3f6b357 commit ae35925
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.72.1"
channel = "1.75.0"
7 changes: 0 additions & 7 deletions zenoh-flow-descriptors/src/flattened/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ use std::{

use zenoh_flow_commons::NodeId;

pub use self::{
dataflow::FlattenedDataFlowDescriptor,
nodes::{
operator::FlattenedOperatorDescriptor, sink::FlattenedSinkDescriptor,
source::FlattenedSourceDescriptor,
},
};
use crate::{
nodes::operator::composite::{CompositeInputDescriptor, CompositeOutputDescriptor},
InputDescriptor, LinkDescriptor, OutputDescriptor,
Expand Down
2 changes: 1 addition & 1 deletion zenoh-flow-nodes/src/io/outputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl Outputs {
/// Insert the `flume::Sender` in the [Outputs], creating the entry if needed in the internal
/// `HashMap`.
pub fn insert(&mut self, port_id: PortId, tx: Sender<LinkMessage>) {
self.hmap.entry(port_id).or_insert_with(Vec::new).push(tx)
self.hmap.entry(port_id).or_default().push(tx)
}

/// Returns an Output builder for the provided `port_id`, if an output was declared with this exact name in the
Expand Down
4 changes: 2 additions & 2 deletions zenoh-flow-records/src/dataflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Caused by:
);
additional_mappings
.entry(runtime_from.clone())
.or_insert_with(HashSet::default)
.or_default()
.insert(sender_id);

receivers.insert(
Expand All @@ -220,7 +220,7 @@ Caused by:
);
additional_mappings
.entry(runtime_to.clone())
.or_insert_with(HashSet::default)
.or_default()
.insert(receiver_id);
}
}
Expand Down

0 comments on commit ae35925

Please sign in to comment.