mirror of
https://github.com/jwinterm/grim.git
synced 2026-10-19 23:08:33 +02:00
build: warnings, unused dependency
This commit is contained in:
@@ -153,7 +153,7 @@ impl PlatformCallbacks for Desktop {
|
||||
}
|
||||
}
|
||||
|
||||
/// Last captured image from started camera.
|
||||
lazy_static! {
|
||||
/// Last captured image from started camera.
|
||||
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 exists = false;
|
||||
for mut c in w_config.external.iter_mut() {
|
||||
for c in w_config.external.iter_mut() {
|
||||
// Update connection if config exists.
|
||||
if c.id == conn.id {
|
||||
c.url = conn.url.clone();
|
||||
@@ -104,7 +104,7 @@ impl ConnectionsConfig {
|
||||
/// Set [`ExternalConnection`] availability flag.
|
||||
pub fn update_ext_conn_availability(id: i64, available: bool) {
|
||||
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 {
|
||||
c.available = Some(available);
|
||||
w_config.save();
|
||||
|
||||
@@ -24,7 +24,6 @@ use std::thread::Thread;
|
||||
use std::time::Duration;
|
||||
use futures::channel::oneshot;
|
||||
use serde_json::{json, Value};
|
||||
use tor_rtcompat::tokio::TokioNativeTlsRuntime;
|
||||
use rand::Rng;
|
||||
|
||||
use grin_api::{ApiServer, Router};
|
||||
@@ -739,10 +738,6 @@ impl Wallet {
|
||||
// Parse response and finalize transaction.
|
||||
let res: Value = serde_json::from_str(&req_res.unwrap()).unwrap();
|
||||
if res["error"] != json!(null) {
|
||||
let report = format!(
|
||||
"Posting transaction slate: Error: {}, Message: {}",
|
||||
res["error"]["code"], res["error"]["message"]
|
||||
);
|
||||
cancel_tx();
|
||||
return None;
|
||||
}
|
||||
@@ -1271,7 +1266,7 @@ fn sync_wallet_data(wallet: &Wallet) {
|
||||
// Setup reposting height.
|
||||
let mut repost_height = None;
|
||||
if posting {
|
||||
if let Some(mut data) = wallet.get_data() {
|
||||
if let Some(data) = wallet.get_data() {
|
||||
for t in data.txs {
|
||||
if t.data.id == tx.id {
|
||||
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.
|
||||
if current_spendable.is_some() {
|
||||
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 {
|
||||
a.spendable_amount = current_spendable.unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user