Skip to content

Commit 68e7319

Browse files
authored
fix(core): update scope usage following #7944 (#7946)
1 parent 44e8a56 commit 68e7319

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

core/tauri/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ pub trait Manager<R: Runtime>: sealed::ManagerBase<R> {
827827

828828
/// Gets the scope for the asset protocol.
829829
#[cfg(feature = "protocol-asset")]
830-
fn asset_protocol_scope(&self) -> FsScope {
830+
fn asset_protocol_scope(&self) -> scope::fs::Scope {
831831
self.state::<Scopes>().inner().asset_protocol.clone()
832832
}
833833

core/tauri/src/protocol/asset.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// SPDX-License-Identifier: MIT
44

5-
use crate::path::SafePathBuf;
6-
use crate::scope::FsScope;
7-
use crate::window::UriSchemeProtocolHandler;
5+
use crate::{path::SafePathBuf, scope, window::UriSchemeProtocolHandler};
86
use http::{header::*, status::StatusCode, Request, Response};
97
use http_range::HttpRange;
108
use rand::RngCore;
@@ -14,7 +12,7 @@ use tauri_utils::mime_type::MimeType;
1412
use tokio::fs::File;
1513
use tokio::io::{AsyncReadExt, AsyncSeekExt, AsyncWriteExt};
1614

17-
pub fn get(scope: FsScope, window_origin: String) -> UriSchemeProtocolHandler {
15+
pub fn get(scope: scope::fs::Scope, window_origin: String) -> UriSchemeProtocolHandler {
1816
Box::new(
1917
move |request, responder| match get_response(request, &scope, &window_origin) {
2018
Ok(response) => responder.respond(response),
@@ -31,7 +29,7 @@ pub fn get(scope: FsScope, window_origin: String) -> UriSchemeProtocolHandler {
3129

3230
fn get_response(
3331
request: Request<Vec<u8>>,
34-
scope: &FsScope,
32+
scope: &scope::fs::Scope,
3533
window_origin: &str,
3634
) -> Result<Response<Cow<'static, [u8]>>, Box<dyn std::error::Error>> {
3735
// skip leading `/`

examples/api/src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/api/src-tauri/src/tray.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub fn create_tray<R: Runtime>(app: &tauri::AppHandle<R>) -> tauri::Result<()> {
101101

102102
_ => {}
103103
})
104-
.on_tray_event(|tray, event| {
104+
.on_tray_icon_event(|tray, event| {
105105
if event.click_type == ClickType::Left {
106106
let app = tray.app_handle();
107107
if let Some(window) = app.get_window("main") {

0 commit comments

Comments
 (0)