Skip to content

Commit

Permalink
chore(lints): set more documentation-related lints to deny (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 authored Sep 9, 2024
2 parents d8f8aa1 + c788f52 commit e83bd42
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ cyw43-pio = { git = "https://github.com/kaspar030/embassy", branch = "for-riot-r
smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp.git", rev = "125773e282bc2e0c914a49e9c75573926e26e558" }

[workspace.lints.rust]
# rustc lints are documented here: https://doc.rust-lang.org/rustc/lints/listing/index.html
private_interfaces = "deny"
private_bounds = "deny"
unsafe_op_in_unsafe_fn = "warn"
unused_must_use = "deny"
# ... until we figure out a way to generate a list of all used cfg variables
Expand All @@ -134,3 +137,6 @@ unexpected_cfgs = "allow"
# Clippy lints are documented here: https://rust-lang.github.io/rust-clippy/master/index.html
indexing_slicing = "deny"
missing_safety_doc = { level = "warn" }

[workspace.lints.rustdoc]
broken_intra_doc_links = "deny"
1 change: 1 addition & 0 deletions src/lib/coapcore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//! for at least as long as the OSCORE component is tightly coupled to a particular implementation
//! of [`coap-message`]).
#![no_std]
#![feature(lint_reasons)]

// Might warrant a standalone crate at some point
//
Expand Down
3 changes: 3 additions & 0 deletions src/lib/coapcore/src/seccontext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use core::fmt::Write;
const MAX_CONTEXTS: usize = 4;

/// A pool of security contexts shareable by several users inside a thread.
#[expect(private_interfaces, reason = "should be addressed eventually")]
pub type SecContextPool<Crypto> =
crate::oluru::OrderedPool<SecContextState<Crypto>, MAX_CONTEXTS, LEVEL_COUNT>;

Expand Down Expand Up @@ -303,10 +304,12 @@ pub enum AuthorizationChecked<I> {

pub enum EdhocResponse<I> {
// Taking a small state here: We already have a slot in the pool, storing the big data there
#[expect(private_interfaces, reason = "should be addressed eventually")]
OkSend2(COwn),
// Could have a state Message3Processed -- but do we really want to implement that? (like, just
// use the EDHOC option)
OscoreRequest {
#[expect(private_interfaces, reason = "should be addressed eventually")]
kid: COwn,
correlation: liboscore::raw::oscore_requestid_t,
extracted: AuthorizationChecked<I>,
Expand Down

0 comments on commit e83bd42

Please sign in to comment.