Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 2021 edition #179

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "zeromq"
version = "0.3.3"
authors = ["Alexei Kornienko <[email protected]>"]
edition = "2018"
edition = "2021"
description = "A native Rust implementation of ZeroMQ"
license = "MIT"
repository = "https://github.com/zeromq/zmq.rs"
Expand Down
2 changes: 1 addition & 1 deletion benches/req_rep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fn criterion_benchmark(c: &mut Criterion) {
bench(&mut group, "IPC", "ipc://req_rep.sock", &mut rt);

fn bench(group: &mut BenchGroup, bench_name: &str, endpoint: &str, rt: &mut Runtime) {
#[allow(unused)]
#[allow(unused, clippy::redundant_locals)]
let rt = rt;

#[cfg(feature = "tokio-runtime")]
Expand Down
2 changes: 1 addition & 1 deletion src/fair_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<K: Clone> Eq for ReadyEvent<K> {}

impl<K: Clone> PartialOrd for ReadyEvent<K> {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
other.priority.partial_cmp(&self.priority)
Some(self.cmp(other))
}
}
impl<K: Clone> Ord for ReadyEvent<K> {
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ pub trait Socket: Sized + Send {
/// Returns the endpoint resolved to the exact bound location if applicable
/// (port # resolved, for example).
async fn bind(&mut self, endpoint: &str) -> ZmqResult<Endpoint> {
let endpoint = endpoint.try_into()?;
let endpoint = TryIntoEndpoint::try_into(endpoint)?;

let cloned_backend = self.backend();
let cback = move |result| {
Expand Down Expand Up @@ -300,7 +300,7 @@ pub trait Socket: Sized + Send {
/// Connects to the given endpoint.
async fn connect(&mut self, endpoint: &str) -> ZmqResult<()> {
let backend = self.backend();
let endpoint = endpoint.try_into()?;
let endpoint = TryIntoEndpoint::try_into(endpoint)?;

let result = match util::connect_forever(endpoint).await {
Ok((socket, endpoint)) => match util::peer_connected(socket, backend).await {
Expand Down
Loading