From a42180a37a510eb6e81ca6bee9a03e2852ce366b Mon Sep 17 00:00:00 2001 From: Joakim Hulthe Date: Tue, 11 Feb 2025 15:40:21 +0100 Subject: [PATCH] Allow undocumented_unsafe_blocks in some modules --- mullvad-api/src/ffi/mod.rs | 2 ++ mullvad-daemon/src/macos_launch_daemon.rs | 2 ++ talpid-core/src/dns/macos.rs | 2 ++ talpid-openvpn/src/wintun.rs | 2 ++ talpid-routing/src/unix/macos/interface.rs | 2 ++ talpid-windows/src/net.rs | 2 ++ talpid-windows/src/process.rs | 2 ++ talpid-windows/src/sync.rs | 2 ++ 8 files changed, 16 insertions(+) diff --git a/mullvad-api/src/ffi/mod.rs b/mullvad-api/src/ffi/mod.rs index 5eae180f018d..3e0324d29b31 100644 --- a/mullvad-api/src/ffi/mod.rs +++ b/mullvad-api/src/ffi/mod.rs @@ -1,4 +1,6 @@ #![cfg(not(target_os = "android"))] +#![allow(clippy::undocumented_unsafe_blocks)] // Remove me if you dare. + use std::{ ffi::{CStr, CString}, net::SocketAddr, diff --git a/mullvad-daemon/src/macos_launch_daemon.rs b/mullvad-daemon/src/macos_launch_daemon.rs index 0c9c89080cb7..4b7a6c5efa5d 100644 --- a/mullvad-daemon/src/macos_launch_daemon.rs +++ b/mullvad-daemon/src/macos_launch_daemon.rs @@ -5,6 +5,8 @@ //! must be checked so that the user can be directed to approve the launch //! daemon in the system settings. +#![allow(clippy::undocumented_unsafe_blocks)] // Remove me if you dare. + use libc::c_longlong; use objc2::{class, msg_send, runtime::AnyObject, Encode, Encoding, RefEncode}; use std::ffi::CStr; diff --git a/talpid-core/src/dns/macos.rs b/talpid-core/src/dns/macos.rs index aa40c0c4bc74..09d95368361e 100644 --- a/talpid-core/src/dns/macos.rs +++ b/talpid-core/src/dns/macos.rs @@ -1,3 +1,5 @@ +#![allow(clippy::undocumented_unsafe_blocks)] // Remove me if you dare. + use parking_lot::Mutex; use std::{ collections::{BTreeSet, HashMap}, diff --git a/talpid-openvpn/src/wintun.rs b/talpid-openvpn/src/wintun.rs index e3e793882830..21c81e0161d0 100644 --- a/talpid-openvpn/src/wintun.rs +++ b/talpid-openvpn/src/wintun.rs @@ -1,3 +1,5 @@ +#![allow(clippy::undocumented_unsafe_blocks)] // Remove me if you dare. + use once_cell::sync::OnceCell; use std::{ffi::CStr, fmt, io, mem, os::windows::io::RawHandle, path::Path, ptr}; use talpid_types::{win32_err, ErrorExt}; diff --git a/talpid-routing/src/unix/macos/interface.rs b/talpid-routing/src/unix/macos/interface.rs index 43e30d354973..7de3f84cc5f7 100644 --- a/talpid-routing/src/unix/macos/interface.rs +++ b/talpid-routing/src/unix/macos/interface.rs @@ -1,3 +1,5 @@ +#![allow(clippy::undocumented_unsafe_blocks)] // Remove me if you dare. + use futures::channel::mpsc::{self, UnboundedReceiver, UnboundedSender}; use ipnetwork::IpNetwork; use nix::{ diff --git a/talpid-windows/src/net.rs b/talpid-windows/src/net.rs index 5013f21e2d92..a15a2a82dbdd 100644 --- a/talpid-windows/src/net.rs +++ b/talpid-windows/src/net.rs @@ -1,3 +1,5 @@ +#![allow(clippy::undocumented_unsafe_blocks)] // Remove me if you dare. + use socket2::SockAddr; use std::{ ffi::{OsStr, OsString}, diff --git a/talpid-windows/src/process.rs b/talpid-windows/src/process.rs index ecddbe09f200..fcf58c9654d1 100644 --- a/talpid-windows/src/process.rs +++ b/talpid-windows/src/process.rs @@ -1,3 +1,5 @@ +#![allow(clippy::undocumented_unsafe_blocks)] // Remove me if you dare + use std::{ ffi::{c_char, CStr}, io, mem, diff --git a/talpid-windows/src/sync.rs b/talpid-windows/src/sync.rs index 7b4ed59be3d6..79a86d694105 100644 --- a/talpid-windows/src/sync.rs +++ b/talpid-windows/src/sync.rs @@ -1,3 +1,5 @@ +#![allow(clippy::undocumented_unsafe_blocks)] // Remove me if you dare. + use std::{io, ptr}; use windows_sys::Win32::{ Foundation::{CloseHandle, DuplicateHandle, BOOL, DUPLICATE_SAME_ACCESS, HANDLE},