build: enable unused_crate_dependencies lint

All reported cases were actually unused dependencies.
This commit is contained in:
Benoît CORTIER 2024-11-03 05:12:53 -05:00 committed by Benoît Cortier
parent 9ec8f547f9
commit d9b69c68f9
14 changed files with 19 additions and 28 deletions

6
Cargo.lock generated
View file

@ -1506,7 +1506,6 @@ dependencies = [
"thiserror",
"tracing",
"tracing-subscriber",
"windows 0.58.0",
]
[[package]]
@ -2309,7 +2308,6 @@ dependencies = [
"bitflags 2.6.0",
"ironrdp-core",
"ironrdp-dvc",
"ironrdp-pdu",
"num-derive",
"num-traits",
]
@ -2393,7 +2391,6 @@ name = "ironrdp-cliprdr-format"
version = "0.1.0"
dependencies = [
"ironrdp-core",
"ironrdp-pdu",
"png",
"thiserror",
]
@ -2404,7 +2401,6 @@ version = "0.1.0"
dependencies = [
"ironrdp-cliprdr",
"ironrdp-core",
"ironrdp-svc",
"thiserror",
"tracing",
"windows 0.58.0",
@ -2497,7 +2493,6 @@ dependencies = [
"byteorder",
"expect-test",
"ironrdp-core",
"ironrdp-error",
"ironrdp-pdu",
"lazy_static",
"num-derive",
@ -3148,7 +3143,6 @@ version = "0.1.0"
dependencies = [
"bitflags 2.6.0",
"ironrdp-core",
"ironrdp-error",
"ironrdp-pdu",
]

View file

@ -94,7 +94,7 @@ noop_method_call = "warn"
# missing_docs = "warn" # TODO: NOTE(@CBenoit): we probably want to ensure this in core tier crates only
# == Compile-time / optimization == #
# TODO: unused_crate_dependencies = "warn"
unused_crate_dependencies = "warn"
unused_macro_rules = "warn"
[workspace.lints.clippy]

View file

@ -16,13 +16,11 @@ doctest = false
test = false
[dependencies]
ironrdp-dvc.workspace = true
ironrdp-pdu.workspace = true
bitflags.workspace = true
ironrdp-core.workspace = true
ironrdp-dvc.workspace = true
num-derive.workspace = true # TODO: remove
num-traits.workspace = true # TODO: remove
ironrdp-core.workspace = true
[lints]
workspace = true

View file

@ -17,10 +17,9 @@ doctest = false
test = false
[dependencies]
ironrdp-pdu.workspace = true
thiserror.workspace = true
png = "0.17"
ironrdp-core.workspace = true
thiserror.workspace = true # FIXME: handwrite the Error trait implementations.
png = "0.17"
[lints]
workspace = true

View file

@ -17,9 +17,8 @@ doctest = false
test = false
[dependencies]
ironrdp-core.workspace = true
ironrdp-cliprdr.workspace = true
ironrdp-svc.workspace = true
ironrdp-core.workspace = true
tracing.workspace = true
[target.'cfg(windows)'.dependencies]

View file

@ -21,7 +21,6 @@ bitflags.workspace = true
bitvec = "1.0"
byteorder.workspace = true # TODO: remove
ironrdp-core.workspace = true
ironrdp-error.workspace = true
ironrdp-pdu = { workspace = true, features = ["std"] }
lazy_static.workspace = true # TODO: remove in favor of https://doc.rust-lang.org/std/sync/struct.OnceLock.html
num-derive.workspace = true # TODO: remove

View file

@ -15,7 +15,6 @@ categories.workspace = true
doctest = false
test = false
[target.'cfg(any(target_os = "macos", target_os = "linux"))'.dependencies]
ironrdp-core.workspace = true
ironrdp-pdu.workspace = true

View file

@ -3,6 +3,9 @@
html_logo_url = "https://webdevolutions.blob.core.windows.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg"
)]
#[cfg(test)]
use tracing_subscriber as _;
#[macro_use]
extern crate tracing;

View file

@ -4,6 +4,7 @@
#![allow(clippy::cast_possible_truncation)]
#![allow(clippy::cast_possible_wrap)]
#![allow(clippy::cast_sign_loss)]
#![allow(unused_crate_dependencies)]
#[macro_use]
extern crate array_concat;

View file

@ -17,11 +17,10 @@ mod dvc;
mod fuzz_regression;
mod graphics;
mod input;
mod now_proto;
mod pcb;
mod pdu;
mod rdcleanpath;
mod rdpsnd;
mod server_name;
mod session;
mod now_proto;

View file

@ -3,6 +3,12 @@
html_logo_url = "https://webdevolutions.blob.core.windows.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg"
)]
#[cfg(test)]
use {
anyhow as _, async_trait as _, bmp as _, ironrdp_blocking as _, ironrdp_cliprdr_native as _, pico_args as _,
rand as _, tokio_rustls as _, tracing as _, tracing_subscriber as _, x509_cert as _,
};
#[cfg(feature = "acceptor")]
pub use ironrdp_acceptor as acceptor;
#[cfg(feature = "cliprdr")]

View file

@ -18,12 +18,11 @@ test = false
[dependencies]
bitflags = "2"
ironrdp-core.workspace = true
ironrdp-error = { path = "../ironrdp-error" }
ironrdp-pdu = { path = "../ironrdp-pdu" }
[features]
default = ["std"]
std = ["ironrdp-error/std", "ironrdp-pdu/std", "ironrdp-core/std"]
std = ["ironrdp-pdu/std", "ironrdp-core/std"]
[lints]
workspace = true

View file

@ -30,9 +30,6 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[target.'cfg(windows)'.build-dependencies]
embed-resource = "2.5"
[target.'cfg(windows)'.dependencies]
windows = { workspace = true, features = ["Win32_Foundation"] }
[lints]
workspace = true

4
fuzz/Cargo.lock generated
View file

@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
version = 4
[[package]]
name = "adler"
@ -288,7 +288,6 @@ name = "ironrdp-cliprdr-format"
version = "0.1.0"
dependencies = [
"ironrdp-core",
"ironrdp-pdu",
"png",
"thiserror",
]
@ -359,7 +358,6 @@ dependencies = [
"bitvec",
"byteorder",
"ironrdp-core",
"ironrdp-error",
"ironrdp-pdu",
"lazy_static",
"num-derive",