Skip to content

Commit

Permalink
Suppress a few pedantic clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Jan 10, 2025
1 parent e162a5a commit bb202d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ mod mac_addr6_as_string {
use macaddr::MacAddr6;
use serde::{Deserialize, Deserializer, Serializer};

#[allow(
clippy::trivially_copy_pass_by_ref,
reason = "serde's with requires a &T type here"
)]
pub fn serialize<S>(addr: &MacAddr6, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
Expand Down
4 changes: 4 additions & 0 deletions src/net/ping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ use socket2::{Domain, Protocol, Type};

use crate::config::G_LOG_DOMAIN;

#[allow(
clippy::needless_pass_by_value,
reason = "Taking error by value is more ergonomic with map_err"
)]
fn to_glib_error(error: std::io::Error) -> glib::Error {
let io_error = error
.raw_os_error()
Expand Down

0 comments on commit bb202d4

Please sign in to comment.