Skip to content

Commit

Permalink
fix(coapcore): allow dead-code in oluru
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Jan 29, 2025
1 parent 869da50 commit 88bae23
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/coapcore/src/oluru.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ impl<T: PriorityLevel, const N: usize, const L: usize> OrderedPool<T, N, L> {
/// If the new element's priority is lower than the lowest in the queue, it is returned as an
/// Err. Otherwise, the element is inserted, and any dropped lower priority element is
/// returned in the Ok value.
// Dead code is only allowed and not expected because of interactions testing.
#[allow(
dead_code,
reason = "Need for this function is unclear, but it is covered in tests and docs, and may easily be needed again as coapcore is being refactored."
)]
pub(crate) fn insert(&mut self, new: T) -> Result<Option<T>, T> {
let new_index = self.entries.len();
if new_index < N {
Expand Down

0 comments on commit 88bae23

Please sign in to comment.