Skip to content

Commit

Permalink
rust code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Nov 22, 2023
1 parent 8f7d6c9 commit 3430d53
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 15 deletions.
29 changes: 21 additions & 8 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ crate-type = ["staticlib", "cdylib", "rlib"]
tauri-build = { version = "1.5.0", features = [] }

[dependencies]
tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_repr = "0.1.16"
Expand All @@ -40,6 +39,7 @@ pathdiff = "0.2.1"
libssh-rs = { version = "0.2.1", features = ["vendored"] }
libssh-rs-sys = "0.2.1"
flate2 = "1.0"
regex = "1.10.2"

[dependencies.tauri]
version = "1.5.2"
Expand All @@ -57,6 +57,10 @@ features = ["windows_dpi_awareness", "windows_visual_styles"]
[dependencies.openssl]
version = "0.10.57"

[dependencies.tauri-plugin-single-instance]
git = "https://github.com/tauri-apps/plugins-workspace"
branch = "dev"

[features]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/conn_pool/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::sync::Mutex;
use std::time::Duration;

use libssh_rs::{AuthStatus, Session, SshKey, SshOption};
use tauri::regex::Regex;
use regex::Regex;
use uuid::Uuid;

use crate::conn_pool::{DeviceConnection, DeviceConnectionUserInfo, Id};
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use std::io::ErrorKind;
use std::str::FromStr;

use libssh_rs::{Error as SshError, SftpError};
use regex::Regex;
use reqwest::StatusCode;
use serde::{Serialize, Serializer};
use tauri::regex::Regex;

#[derive(Debug, Serialize, Clone)]
#[serde(tag = "reason")]
Expand Down
1 change: 0 additions & 1 deletion src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod session_manager;
mod shell_manager;
mod spawn_manager;


//#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
env_logger::builder().filter_level(LevelFilter::Debug).init();
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/src/plugins/devmode.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use reqwest::Url;
use std::io::Read;

use regex::Regex;
use reqwest::Url;
use serde::{Deserialize, Serialize};
use tauri::plugin::{Builder, TauriPlugin};
use tauri::regex::Regex;
use tauri::{AppHandle, Manager, Runtime};
use tauri::plugin::{Builder, TauriPlugin};

use crate::device_manager::Device;
use crate::error::Error;
Expand Down

0 comments on commit 3430d53

Please sign in to comment.