Skip to content

Commit 090ef80

Browse files
committed
refactor: remove code for desktop
1 parent 8f42890 commit 090ef80

4 files changed

Lines changed: 3 additions & 55 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ repository = "https://github.com/impierce/tauri-plugin-keystore"
1111
license = "Apache-2.0"
1212

1313
[dependencies]
14-
tauri = { version = "2.2.4" }
14+
tauri = { version = "2" }
1515
serde = "1.0"
1616
thiserror = "2"
17-
keyring = { version = "3", features = ["apple-native"] }
1817

1918
[build-dependencies]
2019
tauri-plugin = { version = "2.0.3", features = ["build"] }

src/desktop.rs

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/lib.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1+
#![cfg(mobile)]
2+
13
use tauri::{
24
plugin::{Builder, TauriPlugin},
35
Manager, Runtime,
46
};
57

68
pub use models::*;
79

8-
#[cfg(desktop)]
9-
mod desktop;
10-
#[cfg(mobile)]
1110
mod mobile;
1211

1312
mod commands;
@@ -16,9 +15,6 @@ mod models;
1615

1716
pub use error::{Error, Result};
1817

19-
#[cfg(desktop)]
20-
use desktop::Keystore;
21-
#[cfg(mobile)]
2218
use mobile::Keystore;
2319

2420
/// Extensions to [`tauri::App`], [`tauri::AppHandle`] and [`tauri::Window`] to access the keystore APIs.
@@ -41,10 +37,7 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
4137
commands::store
4238
])
4339
.setup(|app, api| {
44-
#[cfg(mobile)]
4540
let keystore = mobile::init(app, api)?;
46-
#[cfg(desktop)]
47-
let keystore = desktop::init(app, api)?;
4841
app.manage(keystore);
4942
Ok(())
5043
})

src/mobile.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ impl<R: Runtime> Keystore<R> {
3535
self.0
3636
.run_mobile_plugin("retrieve", payload)
3737
.map_err(Into::into)
38-
// let entry = keyring::Entry::new(&payload.service, &payload.user).unwrap();
39-
// let password = entry.get_password().unwrap();
40-
// Ok(RetrieveResponse {
41-
// password: Some(password),
42-
// })
4338
}
4439

4540
pub fn remove(&self, payload: RemoveRequest) -> crate::Result<()> {

0 commit comments

Comments
 (0)