Skip to content

Commit

Permalink
fix protocol impl
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Sep 6, 2023
1 parent a52f13c commit f9c933f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/tauri/src/ipc/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ fn handle_ipc_message<R: Runtime>(message: String, manager: &WindowManager<R>, l

match &response {
InvokeResponse::Ok(InvokeBody::Json(v)) => {
if !cfg!(target_os = "macos")
if !(cfg!(target_os = "macos") || cfg!(target_os = "ios"))
&& matches!(v, JsonValue::Object(_) | JsonValue::Array(_))
{
let _ = Channel::from_ipc(window.clone(), callback).send(v);
Expand All @@ -254,12 +254,12 @@ fn handle_ipc_message<R: Runtime>(message: String, manager: &WindowManager<R>, l
}
}
InvokeResponse::Ok(InvokeBody::Raw(v)) => {
responder_eval(
&window,
format_callback_result(Result::<_, ()>::Ok(v), callback, error),
error,
);
if cfg!(target_os = "macos") {
if (cfg!(target_os = "macos") || cfg!(target_os = "ios")) {

Check failure on line 257 in core/tauri/src/ipc/protocol.rs

View workflow job for this annotation

GitHub Actions / empty

unnecessary parentheses around `if` condition

error: unnecessary parentheses around `if` condition --> core/tauri/src/ipc/protocol.rs:257:22 | 257 | if (cfg!(target_os = "macos") || cfg!(target_os = "ios")) { | ^ ^ | = note: `-D unused-parens` implied by `-D warnings` help: remove these parentheses | 257 - if (cfg!(target_os = "macos") || cfg!(target_os = "ios")) { 257 + if cfg!(target_os = "macos") || cfg!(target_os = "ios") { |

Check warning on line 257 in core/tauri/src/ipc/protocol.rs

View workflow job for this annotation

GitHub Actions / test (aarch64-linux-android, ubuntu-latest, 1.65.0, true, build, --features compression, all)

unnecessary parentheses around `if` condition

Check warning on line 257 in core/tauri/src/ipc/protocol.rs

View workflow job for this annotation

GitHub Actions / test (aarch64-linux-android, ubuntu-latest, 1.65.0, true, build, --no-default-features, no-default)

unnecessary parentheses around `if` condition

Check warning on line 257 in core/tauri/src/ipc/protocol.rs

View workflow job for this annotation

GitHub Actions / test (aarch64-apple-ios, macos-latest, 1.65.0, false, build, --features compression, all)

unnecessary parentheses around `if` condition

Check warning on line 257 in core/tauri/src/ipc/protocol.rs

View workflow job for this annotation

GitHub Actions / test (aarch64-apple-ios, macos-latest, 1.65.0, false, build, --no-default-features, no-default)

unnecessary parentheses around `if` condition

Check warning on line 257 in core/tauri/src/ipc/protocol.rs

View workflow job for this annotation

GitHub Actions / test (x86_64-apple-darwin, macos-latest, 1.65.0, false, test, --no-default-features, no-default)

unnecessary parentheses around `if` condition
responder_eval(
&window,
format_callback_result(Result::<_, ()>::Ok(v), callback, error),
error,
);
} else {
let _ =
Channel::from_ipc(window.clone(), callback).send(InvokeBody::Raw(v.clone()));
Expand Down

0 comments on commit f9c933f

Please sign in to comment.