🔧 fix unused variable warning and suppress must-use lint in macros

- Prefix `_object_id` parameter with underscore to silence unused variable warning in `get_item`
- Add #[allow(unused_must_use)] to all action macro definitions in pmoupnp/macros.rs
- Remove redundant doc comment line break
This commit is contained in:
2026-04-04 00:54:13 +02:00
parent d81e7a9413
commit 34260e7cbd
2 changed files with 5 additions and 2 deletions

View File

@@ -97,7 +97,6 @@
/// ```
///
/// # Notes d'implémentation
///
/// - Les `Arc<StateVariable>` sont clonés (shallow copy du pointeur)
/// - Chaque `Argument` est wrappé dans un `Arc`
/// - L'`Action` finale est wrappée dans un `Arc`
@@ -112,6 +111,7 @@ macro_rules! define_action {
}
$(with handler $handler:expr)?
) => {
#[allow(unused_must_use)]
pub static $name: once_cell::sync::Lazy<std::sync::Arc<$crate::actions::Action>> =
once_cell::sync::Lazy::new(|| {
let mut ac = $crate::actions::Action::new($action_name.to_string());
@@ -135,6 +135,7 @@ macro_rules! define_action {
(pub static $name:ident = $action_name:literal stateless
$(with handler $handler:expr)?
) => {
#[allow(unused_must_use)]
pub static $name: once_cell::sync::Lazy<std::sync::Arc<$crate::actions::Action>> =
once_cell::sync::Lazy::new(|| {
let mut ac = $crate::actions::Action::new($action_name.to_string());
@@ -156,6 +157,7 @@ macro_rules! define_action {
}
$(with handler $handler:expr)?
) => {
#[allow(unused_must_use)]
pub static $name: once_cell::sync::Lazy<std::sync::Arc<$crate::actions::Action>> =
once_cell::sync::Lazy::new(|| {
let mut ac = $crate::actions::Action::new($action_name.to_string());
@@ -178,6 +180,7 @@ macro_rules! define_action {
(pub static $name:ident = $action_name:literal
$(with handler $handler:expr)?
) => {
#[allow(unused_must_use)]
pub static $name: once_cell::sync::Lazy<std::sync::Arc<$crate::actions::Action>> =
once_cell::sync::Lazy::new(|| {
let mut ac = $crate::actions::Action::new($action_name.to_string());