Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy warnings #7261

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/daemon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
- name: Install Rust
uses: actions-rs/[email protected]
with:
toolchain: stable
toolchain: 1.81
target: i686-pc-windows-msvc
default: true

Expand Down
1 change: 0 additions & 1 deletion mullvad-cli/src/cmds/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ impl Relay {
}

/// Get active relays which are not bridges.

async fn update_constraints(update_fn: impl FnOnce(&mut RelayConstraints)) -> Result<()> {
let mut rpc = MullvadProxyClient::new().await?;
let settings = rpc.get_settings().await?;
Expand Down
4 changes: 1 addition & 3 deletions mullvad-daemon/src/macos_launch_daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ fn daemon_plist_url() -> Object {
/// Path to the plist that defines the Mullvad launch daemon.
/// It must be kept in sync with the path defined in
/// `dist-assets/pkg-scripts/postinstall`.
const DAEMON_PLIST_PATH: &CStr = unsafe {
CStr::from_bytes_with_nul_unchecked(b"/Library/LaunchDaemons/net.mullvad.daemon.plist\0")
};
const DAEMON_PLIST_PATH: &CStr = c"/Library/LaunchDaemons/net.mullvad.daemon.plist";

let nsstr_inst: Id = unsafe { msg_send![class!(NSString), alloc] };
let nsstr_inst: Id =
Expand Down
2 changes: 1 addition & 1 deletion mullvad-daemon/src/migrations/v7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub struct ShadowsocksProxySettings {
}

// ======================================================
/// This is a closed migration.
// This is a closed migration.

/// We change bridge settings to no longer be an enum with custom and normal variants. It now is a
/// struct which contains a bridge type, a normal relay constraint and optional custom constraints.
Expand Down
61 changes: 13 additions & 48 deletions talpid-wireguard/src/wireguard_nt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,80 +714,45 @@ impl WgNtDll {
Ok(WgNtDll {
handle,
func_create: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardCreateAdapter\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardCreateAdapter")?) as *const _ as *const _)
},
func_close: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardCloseAdapter\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardCloseAdapter")?) as *const _ as *const _)
},
func_get_adapter_luid: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardGetAdapterLUID\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardGetAdapterLUID")?) as *const _ as *const _)
},
func_set_configuration: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardSetConfiguration\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardSetConfiguration")?) as *const _ as *const _)
},
func_get_configuration: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardGetConfiguration\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardGetConfiguration")?) as *const _ as *const _)
},
func_set_adapter_state: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardSetAdapterState\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardSetAdapterState")?) as *const _ as *const _)
},
func_set_logger: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardSetLogger\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardSetLogger")?) as *const _ as *const _)
},
func_set_adapter_logging: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardSetAdapterLogging\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardSetAdapterLogging")?) as *const _ as *const _)
},
#[cfg(daita)]
func_daita_activate: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardDaitaActivate\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardDaitaActivate")?) as *const _ as *const _)
},
#[cfg(daita)]
func_daita_event_data_available_event: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardDaitaEventDataAvailableEvent\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardDaitaEventDataAvailableEvent")?) as *const _
as *const _)
},
#[cfg(daita)]
func_daita_receive_events: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardDaitaReceiveEvents\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardDaitaReceiveEvents")?) as *const _ as *const _)
},
#[cfg(daita)]
func_daita_send_action: unsafe {
*((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WireGuardDaitaSendAction\0").unwrap(),
)?) as *const _ as *const _)
*((&get_proc_fn(handle, c"WireGuardDaitaSendAction")?) as *const _ as *const _)
},
})
}
Expand Down
Loading