Skip to content

Commit 732b4ed

Browse files
authored
Merge branch 'main' into personal/razbenhemo/input_report_read
2 parents 1b1d7cf + 5de1773 commit 732b4ed

File tree

21 files changed

+55
-0
lines changed

21 files changed

+55
-0
lines changed

Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,20 @@ repository = "https://github.com/OpenDevicePartnership/embedded-services"
2828
[workspace.lints.rust]
2929
warnings = "deny"
3030

31+
[workspace.lints.clippy]
32+
correctness = "deny"
33+
expect_used = "deny"
34+
indexing_slicing = "deny"
35+
panic = "deny"
36+
panic_in_result_fn = "deny"
37+
perf = "deny"
38+
suspicious = "deny"
39+
style = "deny"
40+
todo = "deny"
41+
unimplemented = "deny"
42+
unreachable = "deny"
43+
unwrap_used = "deny"
44+
3145
[workspace.dependencies]
3246
aligned = "0.4"
3347
anyhow = "1.0"

debug-service/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#![no_std]
2+
#![allow(clippy::expect_used)]
3+
#![allow(clippy::indexing_slicing)]
4+
#![allow(clippy::unwrap_used)]
5+
26
mod debug_service;
37
mod defmt_ring_logger;
48
pub mod task;

deny.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ ignore = [
7777
{ id = "RUSTSEC-2024-0370", reason = "proc-macro-error is unmaintained, no safe upgrade available, need upstream dependencies to migrate away from it." },
7878
{ id = "RUSTSEC-2024-0436", reason = "there are no suitable replacements for paste right now; paste has been archived as read-only. It only affects compile time concatenation in macros. We will allow it for now" },
7979
{ id = "RUSTSEC-2023-0089", reason = "this is a deprecation warning for a dependency of a dependency. https://github.com/jamesmunns/postcard/issues/223 tracks fixing the dependency; until that's resolved, we can accept the deprecated code as it has no known vulnerabilities." },
80+
{ id = "RUSTSEC-2025-0141", reason = "bincode is unmaintained, planning on migrating to an alternative." },
8081
]
8182
# If this is true, then cargo deny will use the git executable to fetch advisory database.
8283
# If this is false, then it uses a built-in git library.

embedded-service/src/broadcaster/immediate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ impl<T: Clone + 'static> Immediate<T> {
7474
}
7575

7676
#[cfg(test)]
77+
#[allow(clippy::unwrap_used)]
7778
mod test {
7879
use super::*;
7980
use embassy_sync::pubsub::{PubSubChannel, WaitResult};

embedded-service/src/buffer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ macro_rules! define_static_buffer {
320320
}
321321

322322
#[cfg(test)]
323+
#[allow(clippy::unwrap_used)]
323324
mod test {
324325
extern crate std;
325326
use super::*;

embedded-service/src/ec_type/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ pub fn mem_map_to_time_alarm_msg(
504504
}
505505

506506
#[cfg(test)]
507+
#[allow(clippy::unwrap_used)]
507508
mod tests {
508509
use super::*;
509510

embedded-service/src/ec_type/protocols/mctp.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,7 @@ mod tests {
13411341
}
13421342

13431343
#[test]
1344+
#[allow(clippy::panic)]
13441345
fn odp_header_error_on_short_buffer() {
13451346
let header = OdpHeader {
13461347
request_bit: false,

embedded-service/src/hid/command.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,8 @@ impl<'a> Command<'a> {
562562
}
563563

564564
#[cfg(test)]
565+
#[allow(clippy::indexing_slicing)]
566+
#[allow(clippy::unwrap_used)]
565567
mod test {
566568
use super::*;
567569
use crate::define_static_buffer;

embedded-service/src/hid/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ pub async fn send_request(tp: &Endpoint, to: DeviceId, request: Request<'static>
350350
}
351351

352352
#[cfg(test)]
353+
#[allow(clippy::unwrap_used)]
353354
mod test {
354355
use super::*;
355356

embedded-service/src/intrusive_list.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ mod test {
414414
}
415415

416416
#[test]
417+
#[allow(clippy::unwrap_used)]
417418
fn test_monotype_list() {
418419
let list_a = IntrusiveList::new();
419420
let list_b = IntrusiveList::new();
@@ -462,6 +463,7 @@ mod test {
462463
}
463464

464465
#[test]
466+
#[allow(clippy::unwrap_used)]
465467
fn test_multitype_list() {
466468
// list with multiple types within it (same registration type)
467469
let list_a = IntrusiveList::new();
@@ -498,6 +500,7 @@ mod test {
498500
}
499501

500502
#[test]
503+
#[allow(clippy::unwrap_used)]
501504
fn test_multi_list() {
502505
// nodes in multiple lists
503506
let list_a = IntrusiveList::new();
@@ -554,6 +557,7 @@ mod test {
554557
}
555558

556559
#[test]
560+
#[allow(clippy::unwrap_used)]
557561
fn test_multi_registration_list() {
558562
// list with multiple registration types
559563
let list = IntrusiveList::new();

0 commit comments

Comments
 (0)