Skip to content

Commit

Permalink
cleaned up code
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Oct 7, 2023
1 parent 1b8e1c7 commit 1b8c4b9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x

- name: Extract Version
id: pkg-version
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x

- name: Write Version
uses: actions/github-script@v6
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/src/conn_pool/connection.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::fmt::{Debug, Formatter};
use std::io::{Read, Write};
use std::io::Read;
use std::ops::{Deref, DerefMut};
use std::sync::Mutex;
use std::time::Duration;

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

Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/event_channel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct EventChannel<R: Runtime, H: EventHandler + Send + 'static> {
pub trait EventHandler: Sized {
fn tx(&self, payload: Option<&str>);
//noinspection RsLiveness
fn close(&self, payload: Option<&str>) {
fn close(&self, _payload: Option<&str>) {
unimplemented!();
}
}
4 changes: 2 additions & 2 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ mod spawn_manager;
fn main() {
env_logger::builder().filter_level(LevelFilter::Debug).init();
let result = tauri::Builder::default()
.plugin(tauri_plugin_single_instance::init(|app, argv, cwd| {
.plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| {
if let Some(wnd) = app.get_window("main") {
wnd.unminimize().unwrap_or(());
wnd.set_focus().unwrap_or(());
Expand All @@ -44,7 +44,7 @@ fn main() {
.manage(SessionManager::default())
.manage(SpawnManager::default())
.manage(ShellManager::default())
.on_page_load(|wnd, payload| {
.on_page_load(|wnd, _payload| {
let spawns = wnd.state::<SpawnManager>();
spawns.clear();
})
Expand Down
8 changes: 4 additions & 4 deletions src-tauri/src/remote_files/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn serve_worker<R: Runtime>(
}
let (_, ch) = match conn.accept_forward(Duration::from_millis(100)) {
Ok(res) => res,
Err(e) => continue,
Err(_e) => continue,
};
serve_handler(&path, ch)?;
}
Expand All @@ -110,12 +110,12 @@ fn serve_handler(path: &String, ch: Channel) -> Result<(), Error> {
Ok(Status::Partial) => {
continue;
}
Ok(Status::Complete(size)) => {
Ok(Status::Complete(_size)) => {
url = req.path.unwrap().to_string();
method = req.method.unwrap().to_string();
break;
}
Err(e) => {
Err(_e) => {
return Ok(());
}
}
Expand All @@ -134,7 +134,7 @@ fn serve_handler(path: &String, ch: Channel) -> Result<(), Error> {
log::debug!("Serve {} => {:?}", url, path);
let mut file = match File::open(path) {
Ok(file) => file,
Err(e) => {
Err(_e) => {
out.write_all(b"HTTP/1.1 404\r\n\r\nFile not found\n")?;
return Ok(());
}
Expand Down

0 comments on commit 1b8c4b9

Please sign in to comment.