Skip to content

Commit

Permalink
Fix lint on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Aug 30, 2024
1 parent f2e2011 commit ab49f5a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions apps/app/src/api/ads.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use serde::Serialize;
use tauri::plugin::TauriPlugin;
use tauri::{
Emitter, LogicalPosition, LogicalSize, Manager, Runtime, WebviewUrl,
};
use tauri::{Emitter, LogicalPosition, LogicalSize, Manager, Runtime};
use tokio::sync::RwLock;

pub struct AdsState {
Expand Down Expand Up @@ -31,8 +29,6 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
.build()
}

const LINK_SCRIPT: &str = include_str!("ads-init.js");

#[tauri::command]
#[cfg(not(target_os = "linux"))]
pub async fn init_ads_window<R: Runtime>(
Expand All @@ -43,6 +39,9 @@ pub async fn init_ads_window<R: Runtime>(
height: f32,
override_shown: bool,
) -> crate::api::Result<()> {
use tauri::WebviewUrl;
const LINK_SCRIPT: &str = include_str!("ads-init.js");

let state = app.state::<RwLock<AdsState>>();
let mut state = state.write().await;
state.size = Some(LogicalSize::new(width, height));
Expand Down

0 comments on commit ab49f5a

Please sign in to comment.