From b4cdb752b46655601fdbaf311846b586511108ad Mon Sep 17 00:00:00 2001 From: Mogyuchi Date: Thu, 24 Oct 2024 14:42:13 +0900 Subject: [PATCH 1/2] Revert "fix(deps): pin rust crate self_update to =0.41.0 (#464)" This reverts commit 7fd1784bc76342b99c8f3610e935374ec33c5a70. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b7da7033..c8662fc8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ serde = { version = "=1.0.213", features = ["derive"] } serde_derive = "=1.0.213" serde_json = "=1.0.132" sysinfo = "=0.32.0" -self_update = "=0.41.0" +self_update = "0.41.0" [build-dependencies] git2 = { version = "=0.19.0", default-features = false } From 1cc4f8a2fee052a81f62e0cb4a7a736025d050ba Mon Sep 17 00:00:00 2001 From: Mogyuchi Date: Thu, 24 Oct 2024 14:48:41 +0900 Subject: [PATCH 2/2] Revert "feat: add self updator (#453)" This reverts commit 9d0c686af8c8f84a04712537abea3f9bb61e672a. --- Cargo.lock | 108 ---------------------------------------------------- Cargo.toml | 1 - src/main.rs | 20 +--------- 3 files changed, 1 insertion(+), 128 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b353cf86..c797e3a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -171,19 +171,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "console" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.52.0", -] - [[package]] name = "core-foundation" version = "0.9.4" @@ -272,12 +259,6 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - [[package]] name = "encoding_rs" version = "0.8.34" @@ -604,19 +585,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "indicatif" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", -] - [[package]] name = "instant" version = "0.1.13" @@ -656,12 +624,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - [[package]] name = "libc" version = "0.2.161" @@ -763,12 +725,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "object" version = "0.36.5" @@ -849,7 +805,6 @@ dependencies = [ "openssl", "regex", "rust_socketio", - "self_update", "serde", "serde_derive", "serde_json", @@ -881,12 +836,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" -[[package]] -name = "portable-atomic" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" - [[package]] name = "ppv-lite86" version = "0.2.20" @@ -905,15 +854,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "quick-xml" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" -dependencies = [ - "memchr", -] - [[package]] name = "quote" version = "1.0.37" @@ -1203,42 +1143,6 @@ dependencies = [ "libc", ] -[[package]] -name = "self-replace" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ec815b5eab420ab893f63393878d89c90fdd94c0bcc44c07abb8ad95552fb7" -dependencies = [ - "fastrand", - "tempfile", - "windows-sys 0.52.0", -] - -[[package]] -name = "self_update" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469a3970061380c19852269f393e74c0fe607a4e23d85267382cf25486aa8de5" -dependencies = [ - "hyper", - "indicatif", - "log", - "quick-xml", - "regex", - "reqwest", - "self-replace", - "semver", - "serde_json", - "tempfile", - "urlencoding", -] - -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - [[package]] name = "serde" version = "1.0.213" @@ -1590,12 +1494,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - [[package]] name = "untrusted" version = "0.9.0" @@ -1613,12 +1511,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - [[package]] name = "utf-8" version = "0.7.6" diff --git a/Cargo.toml b/Cargo.toml index c8662fc8..b1c45fc2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,6 @@ serde = { version = "=1.0.213", features = ["derive"] } serde_derive = "=1.0.213" serde_json = "=1.0.132" sysinfo = "=0.32.0" -self_update = "0.41.0" [build-dependencies] git2 = { version = "=0.19.0", default-features = false } diff --git a/src/main.rs b/src/main.rs index 1a23dbcb..2f2e3ec5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,13 +16,12 @@ mod unix_to_date; use arc_swap::ArcSwap; use dotenvy::dotenv; use rust_socketio::{ClientBuilder, Event, Payload, RawClient}; -use self_update::cargo_crate_version; use serde_derive::{Deserialize, Serialize}; use serde_json::json; use std::{ env, hint, path::Path, - process::{self}, + process, sync::{Arc, Mutex}, thread, time::Duration, @@ -63,21 +62,6 @@ impl ::std::default::Default for AppConfig { } } -fn update() -> Result<(), Box> { - let config = self_update::backends::github::Update::configure() - .repo_owner("eoeo-org") - .repo_name("pcsc-rs") - .bin_name("pcsc-rs") - .show_download_progress(true) - .current_version(cargo_crate_version!()) - .no_confirm(true) - .build()?; - - config.update()?; - - Ok(()) -} - fn main() { let rs = Path::new(".env").exists(); if rs { @@ -98,8 +82,6 @@ fn main() { } fn start() { - let _ = update(); - let mut system = System::new_all(); let shared_data = Arc::new(ArcSwap::from_pointee(SystemStatus::get(&mut system)));