Skip to content

Commit

Permalink
fix(macos): suppress unused_variables warning reported only in rele…
Browse files Browse the repository at this point in the history
…ase build
  • Loading branch information
rhysd committed Dec 7, 2022
1 parent 5ab72b1 commit cfa79f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/suppress_unused_vars_warning_in_release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": "patch"
---

Suppress `unused_variables` warning reported only in release build.
1 change: 1 addition & 0 deletions src/webview/wkwebview/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ pub extern "C" fn download_did_finish(this: &Object, _: Sel, download: id) {
pub extern "C" fn download_did_fail(this: &Object, _: Sel, download: id, error: id, _: id) {
unsafe {
let description: id = msg_send![error, localizedDescription];
#[allow(unused_variables)]
let description = NSString(description).to_str().to_string();
let original_request: id = msg_send![download, originalRequest];
let url: id = msg_send![original_request, URL];
Expand Down

0 comments on commit cfa79f3

Please sign in to comment.