Allow clippy::new_without_default.

This commit is contained in:
Guillaume Endignoux
2020-09-29 11:19:41 +02:00
parent ca288d2695
commit 63432000db
5 changed files with 2 additions and 10 deletions

View File

@@ -29,4 +29,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --features std
- name: Deny Clippy warnings
run: cargo clippy --all-targets --features std -- -D warnings
run: cargo clippy --all-targets --features std -- -A clippy::new_without_default -D warnings

View File

@@ -31,7 +31,7 @@ cargo fmt --all -- --check
cd ../..
echo "Running Clippy lints..."
cargo clippy --all-targets --features std -- -D warnings
cargo clippy --all-targets --features std -- -A clippy::new_without_default -D warnings
echo "Building sha256sum tool..."
cargo build --manifest-path third_party/tock/tools/sha256sum/Cargo.toml

View File

@@ -137,7 +137,6 @@ impl CtapHid {
const TIMEOUT_DURATION: Duration<isize> = Duration::from_ms(100);
const WINK_TIMEOUT_DURATION: Duration<isize> = Duration::from_ms(5000);
#[allow(clippy::new_without_default)]
pub fn new() -> CtapHid {
CtapHid {
assembler: MessageAssembler::new(),

View File

@@ -49,12 +49,6 @@ pub enum Error {
Timeout,
}
impl Default for MessageAssembler {
fn default() -> Self {
Self::new()
}
}
impl MessageAssembler {
pub fn new() -> MessageAssembler {
MessageAssembler {

View File

@@ -25,7 +25,6 @@ pub struct Console {
}
impl Console {
#[allow(clippy::new_without_default)]
pub fn new() -> Console {
Console {
allow_buffer: [0; BUFFER_SIZE],