use more unwraps instead of let _ =

This commit is contained in:
2025-11-05 00:08:53 +00:00
parent 2030796337
commit 3ab5987b67
4 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ impl GameNetworking {
(FILTER_NAME_IN, NET_FW_RULE_DIR_IN),
(FILTER_NAME_OUT, NET_FW_RULE_DIR_OUT),
] {
let _ = unsafe { rules.Remove(&BSTR::from(filter.0)) };
unsafe { rules.Remove(&BSTR::from(filter.0)) }.unwrap();
let rule: INetFwRule =
unsafe { CoCreateInstance(&NetFwRule, None, CLSCTX_INPROC_SERVER) }.unwrap();
unsafe { rule.SetName(&BSTR::from(filter.0)) }.unwrap();