Skip to content

Commit 8aa0094

Browse files
committed
Add warn in crates; remove warn in test_clippy.py
Signed-off-by: StemCll [email protected]
1 parent 86300b8 commit 8aa0094

File tree

16 files changed

+16
-2
lines changed

16 files changed

+16
-2
lines changed

src/api_server/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#![deny(missing_docs)]
55
#![warn(clippy::ptr_as_ptr)]
6+
#![warn(clippy::cast_lossless)]
67
//! Implements the interface for intercepting API requests, forwarding them to the VMM
78
//! and responding to the user.
89
//! It is constructed on top of an HTTP Server that uses Unix Domain Sockets and `EPOLL` to

src/arch/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#![deny(missing_docs)]
55
#![warn(clippy::ptr_as_ptr)]
6+
#![warn(clippy::cast_lossless)]
67
//! Implements platform specific functionality.
78
//! Supported platforms: x86_64 and aarch64.
89
use std::{fmt, result};

src/cpuid/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#![deny(missing_docs)]
99
#![warn(clippy::ptr_as_ptr)]
10+
#![warn(clippy::cast_lossless)]
1011
//! Utility for configuring the CPUID (CPU identification) for the guest microVM.
1112
1213
#![cfg(target_arch = "x86_64")]

src/devices/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// found in the THIRD-PARTY file.
77

88
#![warn(clippy::ptr_as_ptr)]
9+
#![warn(clippy::cast_lossless)]
910
//! Emulates virtual and hardware devices.
1011
use std::io;
1112

src/dumbo/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#![deny(missing_docs)]
55
#![warn(clippy::ptr_as_ptr)]
6+
#![warn(clippy::cast_lossless)]
67
//! Provides helper logic for parsing and writing protocol data units, and minimalist
78
//! implementations of a TCP listener, a TCP connection, and an HTTP/1.1 server.
89
pub mod pdu;

src/firecracker/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
#![warn(clippy::ptr_as_ptr)]
5+
#![warn(clippy::cast_lossless)]
56

67
mod api_server_adapter;
78
mod metrics;

src/io_uring/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#![deny(missing_docs)]
55
#![warn(clippy::ptr_as_ptr)]
6+
#![warn(clippy::cast_lossless)]
67
//! High-level interface over Linux io_uring.
78
//!
89
//! Aims to provide an easy-to-use interface, while making some Firecracker-specific simplifying

src/jailer/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
#![warn(clippy::ptr_as_ptr)]
5+
#![warn(clippy::cast_lossless)]
56

67
mod cgroup;
78
mod chroot;

src/logger/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#![deny(missing_docs)]
55
#![warn(clippy::ptr_as_ptr)]
6+
#![warn(clippy::cast_lossless)]
67
//! Crate that implements Firecracker specific functionality as far as logging and metrics
78
//! collecting.
89

src/mmds/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
#![warn(clippy::ptr_as_ptr)]
5+
#![warn(clippy::cast_lossless)]
56

67
pub mod data_store;
78
pub mod ns;

src/rate_limiter/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#![deny(missing_docs)]
55
#![warn(clippy::ptr_as_ptr)]
6+
#![warn(clippy::cast_lossless)]
67
//! # Rate Limiter
78
//!
89
//! Provides a rate limiter written in Rust useful for IO operations that need to

src/rebase-snap/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
#![warn(clippy::ptr_as_ptr)]
5+
#![warn(clippy::cast_lossless)]
56

67
use std::fs::{File, OpenOptions};
78
use std::io::{Seek, SeekFrom};

src/seccompiler/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33
#![deny(missing_docs)]
44
#![warn(clippy::ptr_as_ptr)]
5+
#![warn(clippy::cast_lossless)]
56

67
//! The library crate that defines common helper functions that are generally used in
78
//! conjunction with seccompiler-bin.

src/snapshot/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33
#![deny(missing_docs)]
44
#![warn(clippy::ptr_as_ptr)]
5+
#![warn(clippy::cast_lossless)]
56

67
//! Provides version tolerant serialization and deserialization facilities and
78
//! implements a persistent storage format for Firecracker state snapshots.

src/utils/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
#![warn(clippy::ptr_as_ptr)]
5+
#![warn(clippy::cast_lossless)]
56

67
// We use `utils` as a wrapper over `vmm_sys_util` to control the latter
78
// dependency easier (i.e. update only in one place `vmm_sys_util` version).

tests/integration_tests/build/test_clippy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ def test_rust_clippy(target):
2323
@type: build
2424
"""
2525
utils.run_cmd(
26-
"cargo clippy --target {} --all --profile test"
27-
" -- -D warnings -D clippy::cast_lossless".format(target)
26+
"cargo clippy --target {} --all --profile test" " -- -D warnings".format(target)
2827
)

0 commit comments

Comments
 (0)