Skip to content

Commit 3b536ee

Browse files
stanislav-tkachDoumanAsh
authored andcommitted
Use old clippy attributes syntax (#562)
1 parent cfd9a56 commit 3b536ee

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

src/client/connector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ impl Default for ClientConnector {
287287
}
288288
};
289289

290-
#[cfg_attr(feature = "cargo-clippy", allow(clippy::let_unit_value))]
290+
#[cfg_attr(feature = "cargo-clippy", allow(let_unit_value))]
291291
ClientConnector::with_connector_impl(connector)
292292
}
293293
}

src/client/writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![cfg_attr(
22
feature = "cargo-clippy",
3-
allow(clippy::redundant_field_names)
3+
allow(redundant_field_names)
44
)]
55

66
use std::cell::RefCell;

src/httpresponse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ impl HttpResponseBuilder {
694694
}
695695

696696
#[inline]
697-
#[cfg_attr(feature = "cargo-clippy", allow(clippy::borrowed_box))]
697+
#[cfg_attr(feature = "cargo-clippy", allow(borrowed_box))]
698698
fn parts<'a>(
699699
parts: &'a mut Option<Box<InnerHttpResponse>>, err: &Option<HttpError>,
700700
) -> Option<&'a mut Box<InnerHttpResponse>> {

src/info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl ConnectionInfo {
1818
/// Create *ConnectionInfo* instance for a request.
1919
#[cfg_attr(
2020
feature = "cargo-clippy",
21-
allow(clippy::cyclomatic_complexity)
21+
allow(cyclomatic_complexity)
2222
)]
2323
pub fn update(&mut self, req: &Request) {
2424
let mut host = None;

src/middleware/defaultheaders.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl DefaultHeaders {
4848

4949
/// Set a header.
5050
#[inline]
51-
#[cfg_attr(feature = "cargo-clippy", allow(clippy::match_wild_err_arm))]
51+
#[cfg_attr(feature = "cargo-clippy", allow(match_wild_err_arm))]
5252
pub fn header<K, V>(mut self, key: K, value: V) -> Self
5353
where
5454
HeaderName: HttpTryFrom<K>,

src/scope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub struct Scope<S> {
6161

6262
#[cfg_attr(
6363
feature = "cargo-clippy",
64-
allow(clippy::new_without_default_derive)
64+
allow(new_without_default_derive)
6565
)]
6666
impl<S: 'static> Scope<S> {
6767
/// Create a new scope

src/server/h2writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![cfg_attr(
22
feature = "cargo-clippy",
3-
allow(clippy::redundant_field_names)
3+
allow(redundant_field_names)
44
)]
55

66
use std::{cmp, io};

src/server/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ where
326326
#[doc(hidden)]
327327
#[cfg_attr(
328328
feature = "cargo-clippy",
329-
allow(clippy::needless_pass_by_value)
329+
allow(needless_pass_by_value)
330330
)]
331331
pub fn bind_with<S, A>(mut self, addr: S, acceptor: A) -> io::Result<Self>
332332
where

src/server/output.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ impl ContentEncoder {
438438
}
439439
}
440440

441-
#[cfg_attr(feature = "cargo-clippy", allow(clippy::inline_always))]
441+
#[cfg_attr(feature = "cargo-clippy", allow(inline_always))]
442442
#[inline(always)]
443443
pub fn write_eof(&mut self) -> Result<bool, io::Error> {
444444
let encoder =
@@ -480,7 +480,7 @@ impl ContentEncoder {
480480
}
481481
}
482482

483-
#[cfg_attr(feature = "cargo-clippy", allow(clippy::inline_always))]
483+
#[cfg_attr(feature = "cargo-clippy", allow(inline_always))]
484484
#[inline(always)]
485485
pub fn write(&mut self, data: &[u8]) -> Result<(), io::Error> {
486486
match *self {

src/ws/frame.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl Frame {
4646
Frame::message(payload, OpCode::Close, true, genmask)
4747
}
4848

49-
#[cfg_attr(feature = "cargo-clippy", allow(clippy::type_complexity))]
49+
#[cfg_attr(feature = "cargo-clippy", allow(type_complexity))]
5050
fn read_copy_md<S>(
5151
pl: &mut PayloadBuffer<S>, server: bool, max_size: usize,
5252
) -> Poll<Option<(usize, bool, OpCode, usize, Option<u32>)>, ProtocolError>

src/ws/mask.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! This is code from [Tungstenite project](https://github.com/snapview/tungstenite-rs)
2-
#![cfg_attr(feature = "cargo-clippy", allow(clippy::cast_ptr_alignment))]
2+
#![cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
33
use std::ptr::copy_nonoverlapping;
44
use std::slice;
55

@@ -19,7 +19,7 @@ impl<'a> ShortSlice<'a> {
1919

2020
/// Faster version of `apply_mask()` which operates on 8-byte blocks.
2121
#[inline]
22-
#[cfg_attr(feature = "cargo-clippy", allow(clippy::cast_lossless))]
22+
#[cfg_attr(feature = "cargo-clippy", allow(cast_lossless))]
2323
pub(crate) fn apply_mask(buf: &mut [u8], mask_u32: u32) {
2424
// Extend the mask to 64 bits
2525
let mut mask_u64 = ((mask_u32 as u64) << 32) | (mask_u32 as u64);
@@ -52,7 +52,7 @@ pub(crate) fn apply_mask(buf: &mut [u8], mask_u32: u32) {
5252
// a `ShortSlice` must be smaller than a u64.
5353
#[cfg_attr(
5454
feature = "cargo-clippy",
55-
allow(clippy::needless_pass_by_value)
55+
allow(needless_pass_by_value)
5656
)]
5757
fn xor_short(buf: ShortSlice, mask: u64) {
5858
// Unsafe: we know that a `ShortSlice` fits in a u64

0 commit comments

Comments
 (0)