apply clippy suggestions

This commit is contained in:
2025-11-21 11:19:24 +00:00
parent 74132ec322
commit 9b5340a6c5
4 changed files with 8 additions and 6 deletions
+3 -3
View File
@@ -58,7 +58,7 @@ pub struct GameNetworking {
impl Default for GameNetworking {
fn default() -> Self {
Self {
blocked_status: if Self::is_save_server_blocked().unwrap() == true {
blocked_status: if Self::is_save_server_blocked().unwrap() {
Self::is_save_server_blocked().unwrap().into()
} else {
Self::is_exe_blocked().unwrap().into()
@@ -84,7 +84,7 @@ enum Mode {
}
impl GameNetworking {
fn block_generic(&mut self, mode: Mode) -> Result<(), Box<dyn Error>> {
fn block_generic(&self, mode: Mode) -> Result<(), Box<dyn Error>> {
let policy: INetFwPolicy2 =
unsafe { CoCreateInstance(&NetFwPolicy2, None, CLSCTX_INPROC_SERVER) }?;
let rules = unsafe { policy.Rules() }?;
@@ -108,7 +108,7 @@ impl GameNetworking {
Ok(())
}
fn unblock_generic(&mut self, filter_name: &str) -> Result<(), Box<dyn Error>> {
fn unblock_generic(&self, filter_name: &str) -> Result<(), Box<dyn Error>> {
let policy: INetFwPolicy2 =
unsafe { CoCreateInstance(&NetFwPolicy2, None, CLSCTX_INPROC_SERVER) }?;
let rules = unsafe { policy.Rules() }?;