Skip to content

Commit

Permalink
remove sync trait
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Sep 6, 2023
1 parent bc004b0 commit d934906
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/tauri-runtime/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use std::{

use self::dpi::PhysicalPosition;

type UriSchemeProtocol = dyn Fn(HttpRequest<Vec<u8>>, Box<dyn FnOnce(HttpResponse<Cow<'static, [u8]>>) + Send + Sync>)
type UriSchemeProtocol = dyn Fn(HttpRequest<Vec<u8>>, Box<dyn FnOnce(HttpResponse<Cow<'static, [u8]>>) + Send>)
+ Send
+ Sync
+ 'static;
Expand Down Expand Up @@ -310,7 +310,7 @@ impl<T: UserEvent, R: Runtime<T>> PendingWindow<T, R> {

pub fn register_uri_scheme_protocol<
N: Into<String>,
H: Fn(HttpRequest<Vec<u8>>, Box<dyn FnOnce(HttpResponse<Cow<'static, [u8]>>) + Send + Sync>)
H: Fn(HttpRequest<Vec<u8>>, Box<dyn FnOnce(HttpResponse<Cow<'static, [u8]>>) + Send>)
+ Send
+ Sync
+ 'static,
Expand Down
4 changes: 1 addition & 3 deletions core/tauri/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1577,9 +1577,7 @@ impl<R: Runtime> Builder<R> {
}
}

pub struct UriSchemeResponse(
pub(crate) Box<dyn FnOnce(HttpResponse<Cow<'static, [u8]>>) + Send + Sync>,
);
pub struct UriSchemeResponse(pub(crate) Box<dyn FnOnce(HttpResponse<Cow<'static, [u8]>>) + Send>);

impl UriSchemeResponse {
/// Resolves the request with the given response.
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/ipc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub type InvokeResponder<R> =
dyn Fn(&Window<R>, &str, &InvokeResponse, CallbackFn, CallbackFn) + Send + Sync + 'static;
/// Similar to [`InvokeResponder`] but taking owned arguments.
pub type OwnedInvokeResponder<R> =
dyn FnOnce(Window<R>, String, InvokeResponse, CallbackFn, CallbackFn) + Send + Sync + 'static;
dyn FnOnce(Window<R>, String, InvokeResponse, CallbackFn, CallbackFn) + Send + 'static;

/// Possible values of an IPC payload.
#[derive(Debug, Clone)]
Expand Down

0 comments on commit d934906

Please sign in to comment.