Skip to content

Commit

Permalink
fix(net,tls): make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Berrysoft committed Oct 20, 2024
1 parent 48581fa commit b0d82a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions compio-net/src/cmsg/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const fn wsa_cmsg_len(length: usize) -> usize {

pub struct CMsgRef<'a>(&'a CMSGHDR);

impl<'a> CMsgRef<'a> {
impl CMsgRef<'_> {
pub fn level(&self) -> i32 {
self.0.cmsg_level
}
Expand All @@ -76,7 +76,7 @@ impl<'a> CMsgRef<'a> {

pub(crate) struct CMsgMut<'a>(&'a mut CMSGHDR);

impl<'a> CMsgMut<'a> {
impl CMsgMut<'_> {
pub(crate) fn set_level(&mut self, level: i32) {
self.0.cmsg_level = level;
}
Expand Down
4 changes: 1 addition & 3 deletions compio-tls/tests/connect.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::sync::Arc;

use compio_io::{AsyncReadExt, AsyncWrite, AsyncWriteExt};
use compio_net::TcpStream;
use compio_tls::TlsConnector;
Expand Down Expand Up @@ -33,7 +31,7 @@ async fn rtls() {
store.add(cert).unwrap();
}

let connector = TlsConnector::from(Arc::new(
let connector = TlsConnector::from(std::sync::Arc::new(
rustls::ClientConfig::builder()
.with_root_certificates(store)
.with_no_client_auth(),
Expand Down

0 comments on commit b0d82a4

Please sign in to comment.