We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
to_string
1 parent 749bf9a commit eed72cdCopy full SHA for eed72cd
src/util/firewall.rs
@@ -40,9 +40,9 @@ impl Firewall {
40
unsafe { CoCreateInstance(&NetFwRule, None, CLSCTX_INPROC_SERVER) }?;
41
unsafe { rule.SetName(&BSTR::from(name)) }?;
42
match mode {
43
- RuleMode::Executable(exe) => unsafe {
44
- rule.SetApplicationName(&BSTR::from(exe.to_string_lossy().to_string()))
45
- }?,
+ RuleMode::Executable(exe) => {
+ unsafe { rule.SetApplicationName(&BSTR::from(exe.to_string_lossy().as_ref())) }?
+ }
46
RuleMode::Address(ip) => unsafe { rule.SetRemoteAddresses(&BSTR::from(ip)) }?,
47
}
48
match direction {
0 commit comments