From b9751a018f6af326febc20865ae6ee49d2b59e92 Mon Sep 17 00:00:00 2001 From: Jonas Kruckenberg Date: Tue, 1 Nov 2022 16:38:29 +0100 Subject: [PATCH] fmt --- build.rs | 2 +- src/app.rs | 24 ++++++++++++------------ src/clipboard.rs | 14 +++++++------- src/lib.rs | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/build.rs b/build.rs index 388ce1f..650e3d0 100644 --- a/build.rs +++ b/build.rs @@ -10,7 +10,7 @@ fn main() { "tauri/tooling/api/src/clipboard.ts", "tauri/tooling/api/src/tauri.ts", "tauri/tooling/api/src/event.ts", - "tauri/tooling/api/src/mocks.ts" + "tauri/tooling/api/src/mocks.ts", ]) .output() .unwrap(); diff --git a/src/app.rs b/src/app.rs index c216daf..fae2cfb 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,9 +1,9 @@ use semver::Version; /// Gets the application name. -/// +/// /// # Example -/// +/// /// ```typescript /// import { getName } from '@tauri-apps/api/app'; /// const appName = await getName(); @@ -14,9 +14,9 @@ pub async fn get_name() -> String { } /// Gets the application version. -/// +/// /// # Example -/// +/// /// ```rust,no_run /// use tauri_api::app::get_version; /// @@ -30,10 +30,10 @@ pub async fn get_version() -> Version { /// Gets the Tauri version. /// /// # Example -/// +/// /// ```rust,no_run /// use tauri_app::app:get_tauri_version; -/// +/// /// let version = get_tauri_version().await; /// ``` #[inline(always)] @@ -44,10 +44,10 @@ pub async fn get_tauri_version() -> Version { /// Shows the application on macOS. This function does not automatically focuses any app window. /// /// # Example -/// +/// /// ```rust,no_run /// use tauri_api::app::show; -/// +/// /// show().await; /// ``` #[inline(always)] @@ -58,10 +58,10 @@ pub async fn show() { /// Hides the application on macOS. /// /// # Example -/// +/// /// ```rust,no_run /// use tauri_api::app::hide; -/// +/// /// hide().await; /// ``` #[inline(always)] @@ -71,7 +71,7 @@ pub async fn hide() { mod inner { use wasm_bindgen::{prelude::wasm_bindgen, JsValue}; - + #[wasm_bindgen(module = "/dist/app.js")] extern "C" { pub async fn getName() -> JsValue; @@ -80,4 +80,4 @@ mod inner { pub async fn hide(); pub async fn show(); } -} \ No newline at end of file +} diff --git a/src/clipboard.rs b/src/clipboard.rs index 41049fc..a716929 100644 --- a/src/clipboard.rs +++ b/src/clipboard.rs @@ -1,10 +1,10 @@ /// Gets the clipboard content as plain text. -/// +/// /// # Example -/// +/// /// ```rust,no_run /// use tauri_api::clipboard::read_text; -/// +/// /// let clipboard_text = read_text().await; /// ``` #[inline(always)] @@ -13,12 +13,12 @@ pub async fn read_text() -> Option { } /// Writes plain text to the clipboard. -/// +/// /// # Example -/// +/// /// ```rust,no_run /// use tauri_api::clipboard::{write_text, read_text}; -/// +/// /// write_text("Tauri is awesome!").await; /// assert_eq!(read_text().await, "Tauri is awesome!"); /// ``` @@ -37,4 +37,4 @@ mod inner { pub async fn readText() -> JsValue; pub async fn writeText(text: &str); } -} \ No newline at end of file +} diff --git a/src/lib.rs b/src/lib.rs index aeb8a19..20d4fbd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ pub enum Error { #[error(transparent)] Serde(#[from] serde_wasm_bindgen::Error), #[error("{0:?}")] - Other(JsValue) + Other(JsValue), } -pub(crate) type Result = std::result::Result; \ No newline at end of file +pub(crate) type Result = std::result::Result;