Skip to content

Commit 8e6be71

Browse files
committed
Automatically fix new clippy lints on Rust 1.83
1 parent 68fd838 commit 8e6be71

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ pub fn version() -> (i32, i32, i32) {
371371
zmq_sys::zmq_version(&mut major, &mut minor, &mut patch);
372372
}
373373

374-
(major as i32, minor as i32, patch as i32)
374+
(major, minor, patch)
375375
}
376376

377377
struct RawContext {
@@ -442,7 +442,7 @@ impl Context {
442442
/// Set the size of the ØMQ thread pool to handle I/O operations.
443443
pub fn set_io_threads(&self, value: i32) -> Result<()> {
444444
zmq_try!(unsafe {
445-
zmq_sys::zmq_ctx_set(self.raw.ctx, zmq_sys::ZMQ_IO_THREADS as _, value as i32)
445+
zmq_sys::zmq_ctx_set(self.raw.ctx, zmq_sys::ZMQ_IO_THREADS as _, value)
446446
});
447447
Ok(())
448448
}

src/message.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,14 @@ impl From<Box<[u8]>> for Message {
232232
}
233233
}
234234

235-
impl<'a> From<&'a str> for Message {
235+
impl From<&str> for Message {
236236
/// Construct a message from a string slice by copying the UTF-8 data.
237237
fn from(msg: &str) -> Self {
238238
Message::from(msg.as_bytes())
239239
}
240240
}
241241

242-
impl<'a> From<&'a String> for Message {
242+
impl From<&String> for Message {
243243
/// Construct a message from a string slice by copying the UTF-8 data.
244244
fn from(msg: &String) -> Self {
245245
Message::from(msg.as_bytes())

src/sockopt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ fn setsockopt_null(sock: *mut c_void, opt: c_int) -> Result<()> {
101101
Ok(())
102102
}
103103

104-
impl<'a> Setter for &'a str {
104+
impl Setter for &str {
105105
fn set(sock: *mut c_void, opt: c_int, value: Self) -> Result<()> {
106106
set(sock, opt, value.as_bytes())
107107
}
108108
}
109109

110-
impl<'a> Setter for Option<&'a str> {
110+
impl Setter for Option<&str> {
111111
fn set(sock: *mut c_void, opt: c_int, value: Self) -> Result<()> {
112112
if let Some(s) = value {
113113
set(sock, opt, s.as_bytes())

tests/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ test!(test_exchanging_multipart, {
7171
let (sender, receiver) = create_socketpair();
7272

7373
// convenience API
74-
sender.send_multipart(&["foo", "bar"], 0).unwrap();
74+
sender.send_multipart(["foo", "bar"], 0).unwrap();
7575
assert_eq!(receiver.recv_multipart(0).unwrap(), vec![b"foo", b"bar"]);
7676

7777
// manually

0 commit comments

Comments
 (0)