build: warnings, unused dependency
This commit is contained in:
parent
bc20019783
commit
8b579c088f
5 changed files with 5 additions and 12 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -3757,7 +3757,6 @@ version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"android-activity 0.6.0",
|
"android-activity 0.6.0",
|
||||||
"android_logger",
|
"android_logger",
|
||||||
"anyhow",
|
|
||||||
"arboard",
|
"arboard",
|
||||||
"arti",
|
"arti",
|
||||||
"arti-client",
|
"arti-client",
|
||||||
|
|
|
@ -38,7 +38,6 @@ egui_extras = { version = "0.27.2", features = ["image", "svg"] }
|
||||||
rust-i18n = "2.3.1"
|
rust-i18n = "2.3.1"
|
||||||
|
|
||||||
## other
|
## other
|
||||||
anyhow = "1.0.75"
|
|
||||||
thiserror = "1.0.58"
|
thiserror = "1.0.58"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
dirs = "5.0.1"
|
dirs = "5.0.1"
|
||||||
|
|
|
@ -153,7 +153,7 @@ impl PlatformCallbacks for Desktop {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Last captured image from started camera.
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
|
/// Last captured image from started camera.
|
||||||
static ref LAST_CAMERA_IMAGE: Arc<RwLock<Option<(Vec<u8>, u32)>>> = Arc::new(RwLock::new(None));
|
static ref LAST_CAMERA_IMAGE: Arc<RwLock<Option<(Vec<u8>, u32)>>> = Arc::new(RwLock::new(None));
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ impl ConnectionsConfig {
|
||||||
}
|
}
|
||||||
let mut w_config = Settings::conn_config_to_update();
|
let mut w_config = Settings::conn_config_to_update();
|
||||||
let mut exists = false;
|
let mut exists = false;
|
||||||
for mut c in w_config.external.iter_mut() {
|
for c in w_config.external.iter_mut() {
|
||||||
// Update connection if config exists.
|
// Update connection if config exists.
|
||||||
if c.id == conn.id {
|
if c.id == conn.id {
|
||||||
c.url = conn.url.clone();
|
c.url = conn.url.clone();
|
||||||
|
@ -104,7 +104,7 @@ impl ConnectionsConfig {
|
||||||
/// Set [`ExternalConnection`] availability flag.
|
/// Set [`ExternalConnection`] availability flag.
|
||||||
pub fn update_ext_conn_availability(id: i64, available: bool) {
|
pub fn update_ext_conn_availability(id: i64, available: bool) {
|
||||||
let mut w_config = Settings::conn_config_to_update();
|
let mut w_config = Settings::conn_config_to_update();
|
||||||
for mut c in w_config.external.iter_mut() {
|
for c in w_config.external.iter_mut() {
|
||||||
if c.id == id {
|
if c.id == id {
|
||||||
c.available = Some(available);
|
c.available = Some(available);
|
||||||
w_config.save();
|
w_config.save();
|
||||||
|
|
|
@ -24,7 +24,6 @@ use std::thread::Thread;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use futures::channel::oneshot;
|
use futures::channel::oneshot;
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
use tor_rtcompat::tokio::TokioNativeTlsRuntime;
|
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
use grin_api::{ApiServer, Router};
|
use grin_api::{ApiServer, Router};
|
||||||
|
@ -739,10 +738,6 @@ impl Wallet {
|
||||||
// Parse response and finalize transaction.
|
// Parse response and finalize transaction.
|
||||||
let res: Value = serde_json::from_str(&req_res.unwrap()).unwrap();
|
let res: Value = serde_json::from_str(&req_res.unwrap()).unwrap();
|
||||||
if res["error"] != json!(null) {
|
if res["error"] != json!(null) {
|
||||||
let report = format!(
|
|
||||||
"Posting transaction slate: Error: {}, Message: {}",
|
|
||||||
res["error"]["code"], res["error"]["message"]
|
|
||||||
);
|
|
||||||
cancel_tx();
|
cancel_tx();
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
@ -1271,7 +1266,7 @@ fn sync_wallet_data(wallet: &Wallet) {
|
||||||
// Setup reposting height.
|
// Setup reposting height.
|
||||||
let mut repost_height = None;
|
let mut repost_height = None;
|
||||||
if posting {
|
if posting {
|
||||||
if let Some(mut data) = wallet.get_data() {
|
if let Some(data) = wallet.get_data() {
|
||||||
for t in data.txs {
|
for t in data.txs {
|
||||||
if t.data.id == tx.id {
|
if t.data.id == tx.id {
|
||||||
repost_height = t.repost_height;
|
repost_height = t.repost_height;
|
||||||
|
@ -1374,7 +1369,7 @@ fn update_accounts(wallet: &Wallet, current_height: u64, current_spendable: Opti
|
||||||
// Update only current account if list is not empty.
|
// Update only current account if list is not empty.
|
||||||
if current_spendable.is_some() {
|
if current_spendable.is_some() {
|
||||||
let mut accounts = wallet.accounts.read().clone();
|
let mut accounts = wallet.accounts.read().clone();
|
||||||
for mut a in accounts.iter_mut() {
|
for a in accounts.iter_mut() {
|
||||||
if a.label == wallet.get_config().account {
|
if a.label == wallet.get_config().account {
|
||||||
a.spendable_amount = current_spendable.unwrap();
|
a.spendable_amount = current_spendable.unwrap();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue