Added allows for unused things.
This commit is contained in:
parent
77e5072f20
commit
39b6351c85
7 changed files with 11 additions and 11 deletions
|
|
@ -26,6 +26,7 @@ pub enum UserChoice {
|
|||
AcceptAll,
|
||||
}
|
||||
|
||||
#[allow(dead_code)] // ui is unused
|
||||
pub struct TermsCheckerScreen {
|
||||
ui: Arc<UI>,
|
||||
sender: Option<oneshot::Sender<UserChoice>>,
|
||||
|
|
|
|||
|
|
@ -9,10 +9,7 @@ use ratatui::{Terminal, backend::CrosstermBackend, init};
|
|||
use std::{
|
||||
collections::VecDeque,
|
||||
io::Stdout,
|
||||
sync::{
|
||||
Arc, Mutex,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
},
|
||||
sync::{Arc, Mutex, atomic::Ordering},
|
||||
time::Duration,
|
||||
};
|
||||
use tokio::{sync::RwLock, time::Instant};
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use iota_util::file_util::{download_and_extract_zip, has_dir};
|
|||
use omikron_connector as omikron;
|
||||
|
||||
#[tokio::main(flavor = "multi_thread", worker_threads = 16)]
|
||||
#[allow(unused_must_use, dead_code)]
|
||||
#[allow(unused_must_use, dead_code, unused_assignments)]
|
||||
async fn main() {
|
||||
while *RELOAD.read().await {
|
||||
*RELOAD.write().await = false;
|
||||
|
|
@ -107,7 +107,9 @@ async fn main() {
|
|||
sb1 = sb1 + ",";
|
||||
}
|
||||
log!("Community IDS: {}", sb1); */
|
||||
#[allow(unused_variables)] // port is unused
|
||||
let port = CONFIG.read().await.get_port();
|
||||
#[allow(unused_variables)] // ip is unused
|
||||
let mut ip = "0.0.0.0".to_string();
|
||||
for iface in pnet::datalink::interfaces() {
|
||||
let iface: NetworkInterface = iface;
|
||||
|
|
@ -115,7 +117,7 @@ async fn main() {
|
|||
let ipsv = format!("{}", iface.ips[0]);
|
||||
let ips: &str = ipsv.split('/').next().unwrap_or("");
|
||||
if format!("{}", ips).starts_with("10.") || format!("{}", ips).starts_with("192.") {
|
||||
ip = ips.to_string();
|
||||
ip = ips.to_string(); // Unused assignments.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use anyhow::{Context, Result, anyhow};
|
|||
use iota_logger::log;
|
||||
use self_replace::self_replace;
|
||||
use semver::Version;
|
||||
use std::fs::File;
|
||||
use tempfile::NamedTempFile;
|
||||
|
||||
const CURRENT_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
|
@ -108,7 +107,6 @@ async fn download_asset(url: &str) -> Result<NamedTempFile> {
|
|||
}
|
||||
|
||||
let tmp = NamedTempFile::new().context("failed to create temp file")?;
|
||||
let mut out = File::create(tmp.path()).context("failed to open temp file")?;
|
||||
|
||||
let bytes = response
|
||||
.bytes()
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ impl ConnectionState {
|
|||
// Omikron Connection (Client-side with auto-reconnect)
|
||||
// ============================================================================
|
||||
|
||||
#[allow(dead_code)] // message_send_times is unused.
|
||||
pub struct OmikronConnection {
|
||||
state: Arc<RwLock<ConnectionState>>,
|
||||
sender: Arc<RwLock<Option<Arc<Sender>>>>,
|
||||
|
|
@ -283,6 +284,7 @@ impl OmikronConnection {
|
|||
if iota_id == 0 {
|
||||
log_t!("iota_register_new");
|
||||
|
||||
#[allow(unused_variables)] // priv_k is unused
|
||||
let (pub_k, priv_k) = if let (Some(pk), Some(sk)) = (public_key, private_key) {
|
||||
(pk, sk)
|
||||
} else {
|
||||
|
|
@ -426,9 +428,10 @@ impl OmikronConnection {
|
|||
|
||||
if cv.is_type(CommunicationType::client_connected) {
|
||||
let user_id = cv.get_data(DataTypes::user_id).as_number().unwrap_or(0) as i64;
|
||||
#[allow(unused_variables)] // session_id is unused.
|
||||
let session_id = cv.get_data(DataTypes::session_id).as_number().unwrap_or(0) as i64;
|
||||
|
||||
let mut contacts = chats_util::get_users(user_id);
|
||||
let contacts = chats_util::get_users(user_id);
|
||||
let mut contacts_array = Vec::new();
|
||||
|
||||
for (i, contact) in contacts.iter().enumerate() {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
use crate::omikron_connection::OmikronConnection;
|
||||
use dashmap::DashMap;
|
||||
use iota_logger::log;
|
||||
use iota_state::APP_STATE;
|
||||
use std::sync::LazyLock;
|
||||
use std::time::Instant;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ async fn communities_get(req: HttpRequest, ssl: web::Data<bool>) -> impl Respond
|
|||
async fn communities_add(
|
||||
req: HttpRequest,
|
||||
ssl: web::Data<bool>,
|
||||
payload: web::Json<Value>,
|
||||
#[allow(unused_variables)] payload: web::Json<Value>,
|
||||
) -> impl Responder {
|
||||
if !is_allowed_req(&req, *ssl.get_ref()) {
|
||||
return forbidden();
|
||||
|
|
|
|||
Loading…
Reference in a new issue