Skip to content

Commit 9474b44

Browse files
authored
Merge pull request #3 from fire332/fire332-tidy
Bump deps, format code, fix clippy warnings
2 parents 06a3ef0 + 822c86c commit 9474b44

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+349
-257
lines changed

Cargo.lock

Lines changed: 118 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
resolver = "2"
2+
resolver = "3"
33
members = [
44
"common/device",
55
"common/connection",
@@ -11,6 +11,15 @@ members = [
1111
"ares-shell",
1212
]
1313

14+
[workspace.package]
15+
edition = "2024"
16+
license = "Apache-2.0"
17+
authors = ["Mariotaku Lee <mariotaku.lee@gmail.com>"]
18+
19+
[workspace.lints.clippy]
20+
pedantic = { level = "warn", priority = -1 }
21+
upper_case_acronyms = "allow"
22+
1423
[workspace.dependencies]
1524
clap = { version = "4.4.6", features = ["derive", "env"] }
1625
serde = { version = "1.0.214", features = ["derive"] }

ares-device/Cargo.toml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
11
[package]
22
name = "ares-device"
33
version = "0.1.2"
4-
edition = "2021"
5-
authors = ["Mariotaku Lee <mariotaku.lee@gmail.com>"]
6-
license = "Apache-2.0"
4+
edition.workspace = true
5+
authors.workspace = true
6+
license.workspace = true
77
description = "Tools for getting device information"
88

9+
[lints]
10+
workspace = true
11+
912
[dependencies]
1013
common-device = { path = "../common/device" }
1114
common-connection = { path = "../common/connection" }
1215
clap = { workspace = true }
13-
cfg-if = "1.0.0"
16+
cfg-if = "1.0.4"
1417

1518
[target.'cfg(target_os="windows")'.dependencies]
1619
native-windows-gui = { version = "1.0.13" }
1720
native-windows-derive = "1.0.5"
18-
libssh-rs-sys = { workspace = true, features = ["vendored-openssl", "libz-sys"] }
21+
libssh-rs-sys = { workspace = true, features = [
22+
"vendored-openssl",
23+
"libz-sys",
24+
] }
1925

2026
[target.'cfg(not(target_os="windows"))'.dependencies]
2127
libssh-rs-sys = { workspace = true, default-features = false }
2228

2329
[target.'cfg(all(not(target_os="windows"), not(target_os="macos")))'.dependencies]
24-
gtk = "0.18.1"
30+
gtk = "0.18.2"
2531

2632
[build-dependencies]
27-
embed-manifest = "1.4.0"
33+
embed-manifest = "1.5.0"
2834

2935
[package.metadata.deb]
3036
section = "devel"

ares-device/src/picker/windows/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ extern crate native_windows_gui as nwg;
44
use std::fmt::{Display, Formatter};
55
use std::sync::Mutex;
66

7+
use ares_device_lib::Device;
78
use nwd::NwgUi;
89
use nwg::NativeUi;
910

10-
use ares_device_lib::Device;
11-
1211
use crate::picker::PickPrompt;
1312

1413
#[derive(Default)]

ares-install/Cargo.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
[package]
22
name = "ares-install"
33
version = "0.1.5"
4-
edition = "2021"
5-
authors = ["Mariotaku Lee <mariotaku.lee@gmail.com>"]
6-
license = "Apache-2.0"
4+
edition.workspace = true
5+
authors.workspace = true
6+
license.workspace = true
77
description = "Install or Remove app from a device"
88

99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

11+
[lints]
12+
workspace = true
13+
1114
[dependencies]
1215
common-device = { path = "../common/device" }
1316
common-connection = { path = "../common/connection" }
@@ -20,4 +23,4 @@ regex = { workspace = true }
2023
indicatif = { workspace = true }
2124

2225
[package.metadata.deb]
23-
section = "devel"
26+
section = "devel"

ares-install/src/install.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ use std::io::{Error as IoError, ErrorKind};
33
use std::path::Path;
44
use std::time::Duration;
55

6+
use ares_connection_lib::luna::{Luna, LunaError, Message};
7+
use ares_connection_lib::session::DeviceSession;
8+
use ares_connection_lib::transfer::{FileTransfer, TransferError};
69
use indicatif::{ProgressBar, ProgressStyle};
710
use regex::Regex;
811
use serde::{Deserialize, Serialize};
912
use serde_json::Error as JsonError;
1013

11-
use ares_connection_lib::luna::{Luna, LunaError, Message};
12-
use ares_connection_lib::session::DeviceSession;
13-
use ares_connection_lib::transfer::{FileTransfer, TransferError};
14-
1514
pub(crate) trait InstallApp {
1615
fn install_app<P: AsRef<Path>>(&self, package: P) -> Result<(), InstallError>;
1716
}

ares-install/src/list.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
use ares_connection_lib::luna::{Luna, LunaEmptyPayload};
12
use libssh_rs::Session;
23
use serde::Deserialize;
34

4-
use ares_connection_lib::luna::{Luna, LunaEmptyPayload};
5-
65
pub(crate) trait ListApps {
76
fn list_apps(&self);
87
}

ares-install/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use std::path::PathBuf;
22
use std::process::exit;
33

4-
use clap::Parser;
5-
6-
use crate::remove::RemoveApp;
74
use ares_connection_lib::session::NewSession;
85
use ares_device_lib::DeviceManager;
6+
use clap::Parser;
97
use install::InstallApp;
108
use list::ListApps;
119

10+
use crate::remove::RemoveApp;
11+
1212
mod install;
1313
mod list;
1414
mod remove;

ares-install/src/remove.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
use regex::Regex;
2-
use serde::Serialize;
3-
41
use ares_connection_lib::luna::Luna;
52
use ares_connection_lib::session::DeviceSession;
3+
use regex::Regex;
4+
use serde::Serialize;
65

7-
use crate::install::{map_installer_message, InstallError};
6+
use crate::install::{InstallError, map_installer_message};
87

98
pub(crate) trait RemoveApp {
109
fn remove_app(&self, package_id: &str) -> Result<String, InstallError>;

ares-launch/Cargo.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
[package]
22
name = "ares-launch"
33
version = "0.1.2"
4-
edition = "2021"
5-
authors = ["Mariotaku Lee <mariotaku.lee@gmail.com>"]
6-
license = "Apache-2.0"
4+
edition.workspace = true
5+
authors.workspace = true
6+
license.workspace = true
77

88
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
99

10+
[lints]
11+
workspace = true
12+
1013
[dependencies]
1114
common-device = { path = "../common/device" }
1215
common-connection = { path = "../common/connection" }
@@ -16,4 +19,4 @@ serde_json = { workspace = true }
1619
libssh-rs = { workspace = true }
1720

1821
[package.metadata.deb]
19-
section = "devel"
22+
section = "devel"

0 commit comments

Comments
 (0)