Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed May 10, 2023
1 parent 0533022 commit 5261fb0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions core/tauri/src/app.rs
Expand Up @@ -19,14 +19,17 @@ use crate::{
window::{PendingWindow, WindowEvent as RuntimeWindowEvent},
ExitRequestedEventAction, RunEvent as RuntimeRunEvent,
},
scope::{FsScope, IpcScope},
scope::IpcScope,
sealed::{ManagerBase, RuntimeOrDispatch},
utils::config::Config,
utils::{assets::Assets, Env},
Context, DeviceEventFilter, EventLoopMessage, Invoke, InvokeError, InvokeResponse, Manager,
Runtime, Scopes, StateManager, Theme, Window,
};

#[cfg(protocol_asset)]
use crate::scope::FsScope;

use raw_window_handle::HasRawDisplayHandle;
use tauri_macros::default_runtime;
use tauri_runtime::window::{
Expand Down Expand Up @@ -1333,10 +1336,7 @@ impl<R: Runtime> Builder<R> {
app.manage(Scopes {
ipc: IpcScope::new(&app.config()),
#[cfg(protocol_asset)]
asset_protocol: FsScope::for_fs_api(
&app,
&app.config().tauri.allowlist.protocol.asset_scope,
)?,
asset_protocol: for_fs_api(&app, &app.config().tauri.allowlist.protocol.asset_scope)?,
});

#[cfg(windows)]
Expand Down
4 changes: 2 additions & 2 deletions core/tauri/src/scope/mod.rs
Expand Up @@ -17,14 +17,14 @@ pub(crate) struct Scopes {
}

impl Scopes {
#[allow(dead_code)]
#[allow(dead_code, unused)]
pub(crate) fn allow_directory(&self, path: &Path, recursive: bool) -> crate::Result<()> {
#[cfg(protocol_asset)]
self.asset_protocol.allow_directory(path, recursive)?;
Ok(())
}

#[allow(dead_code)]
#[allow(dead_code, unused)]
pub(crate) fn allow_file(&self, path: &Path) -> crate::Result<()> {
#[cfg(protocol_asset)]
self.asset_protocol.allow_file(path)?;
Expand Down

0 comments on commit 5261fb0

Please sign in to comment.