Skip to content

Commit 49ace9c

Browse files
committed
Cleanup
1 parent f83ea80 commit 49ace9c

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/desktop.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ use crate::models::*;
66
pub fn init<R: Runtime, C: DeserializeOwned>(
77
app: &AppHandle<R>,
88
_api: PluginApi<R, C>,
9-
) -> crate::Result<Share<R>> {
10-
Ok(Share(app.clone()))
9+
) -> crate::Result<ShareKit<R>> {
10+
Ok(ShareKit(app.clone()))
1111
}
1212

1313
/// Access to the share APIs.
14-
pub struct Share<R: Runtime>(AppHandle<R>);
14+
pub struct ShareKit<R: Runtime>(AppHandle<R>);
1515

16-
impl<R: Runtime> Share<R> {
16+
impl<R: Runtime> ShareKit<R> {
1717
pub fn share_text(&self, _text: String, _options: ShareTextOptions) -> crate::Result<()> {
1818
Err(crate::Error::UnsupportedPlatform)
1919
}

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ mod models;
1717
pub use error::{Error, Result};
1818

1919
#[cfg(desktop)]
20-
use desktop::Share;
20+
use desktop::ShareKit;
2121
#[cfg(mobile)]
22-
use mobile::Share;
22+
use mobile::ShareKit;
2323

2424
/// Extensions to [`tauri::App`], [`tauri::AppHandle`], [`tauri::WebviewWindow`], [`tauri::Webview`] and [`tauri::Window`] to access the share APIs.
2525
pub trait ShareExt<R: Runtime> {
26-
fn share(&self) -> &Share<R>;
26+
fn share(&self) -> &ShareKit<R>;
2727
}
2828

2929
impl<R: Runtime, T: Manager<R>> crate::ShareExt<R> for T {
30-
fn share(&self) -> &Share<R> {
31-
self.state::<Share<R>>().inner()
30+
fn share(&self) -> &ShareKit<R> {
31+
self.state::<ShareKit<R>>().inner()
3232
}
3333
}
3434

src/mobile.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ tauri::ios_plugin_binding!(init_plugin_share);
1515
pub fn init<R: Runtime, C: DeserializeOwned>(
1616
_app: &AppHandle<R>,
1717
api: PluginApi<R, C>,
18-
) -> crate::Result<Share<R>> {
18+
) -> crate::Result<ShareKit<R>> {
1919
#[cfg(target_os = "android")]
2020
let handle = api.register_android_plugin(PLUGIN_IDENTIFIER, "SharePlugin")?;
2121
#[cfg(target_os = "ios")]
2222
let handle = api.register_ios_plugin(init_plugin_share)?;
2323

24-
Ok(Share(handle))
24+
Ok(ShareKit(handle))
2525
}
2626

2727
/// Access to the share APIs.
28-
pub struct Share<R: Runtime>(PluginHandle<R>);
28+
pub struct ShareKit<R: Runtime>(PluginHandle<R>);
2929

30-
impl<R: Runtime> Share<R> {
30+
impl<R: Runtime> ShareKit<R> {
3131
pub fn share_text(&self, text: String, options: ShareTextOptions) -> crate::Result<()> {
3232
self.0
3333
.run_mobile_plugin("shareText", ShareTextPayload { text, options })

0 commit comments

Comments
 (0)