Authentication-Results: mail-b.sr.ht; dkim=pass header.d=alyssa.is header.i=@alyssa.is; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mail-b.sr.ht (Postfix) with ESMTPS id 82EE611EF72 for <~qaul/community@lists.sr.ht>; Mon, 1 Mar 2021 22:45:08 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 1F0593B8; Mon, 1 Mar 2021 17:45:07 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 01 Mar 2021 17:45:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=qH4yg/dxT/4Dr CDh3PX9PkKNC7Q96j+rgQwMbRExvBQ=; b=UdkY7GTGjlSr4lVhfd6JYb+b8zT+A HUGB/5NrBY9REk7wyhl1WEI+Z68B6TO+fqibPA/MWA14Wbr/e4rSTjGZWfb8qIOn X3Q/9VDgkJcg3eABkx3+rKJMDpEpMa9KbCDHs0NQOPsEtCejJSiSp+g63rqr2LyB nwYSlbaU3C4bB0k1BzEegQPRuF62ijD89OMYx7yWFJyOfzgOvKgIBSOmsWZgdFFB TiyKHrA2YrmFQgEoQTGAJaM2kNepEWzRMlRIHpW4n8s/nsUZvcpjtTf1BlQKiD08 cFwY94gNGKshZpRLgkQdRWETCtUPXon/mGvPIxBP1W5pYYS8rsM7vVwmw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=qH4yg/dxT/4DrCDh3PX9PkKNC7Q96j+rgQwMbRExvBQ=; b=bBw4rHxn REdp77Oyv4i4h5dUs/jS47NlanLztZqAFUTQRxEgqnyY+mxp/mBHSDtzrMCHj2ag cpFNIlI0w4n5ku+pYWIiXUe0cXpQNTVogvGF+/nPW8gv2dpJeoJXh+T7Qy8qOrH2 kMuUsKNxHTORIT3nLT6QrKnVb2HIGeWEuL2EkCga6KU1CGLCgxKA1lBFu4ywcePZ 5ABzv8+mVmfR2lwm5LW8wnkD6IBCS3pkRAV967LKklwGJt8icjbnsSnsVgw2Zwvw ojnZV2KJevJo+J8aHZtDcR6sf7XAL2jpI9hFGrtvFROQX2JQFglrMdtgb1ZXdM18 vHGMFk8XnPo7eg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrleelgddtvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhihshhsrgcutfhoshhsuceohhhisegrlhihshhsrgdrihhs qeenucggtffrrghtthgvrhhnpefgfedukedvleeileeludefveehgeelgfegvddujedvtd ffueeuveffheeljeekvdenucfkphepjeelrddvfeehrdduvddvrddugeehnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepqhihlhhishhssegvvh gvrdhqhihlihhsshdrnhgvth X-ME-Proxy: Received: from eve.qyliss.net (p4feb7a91.dip0.t-ipconnect.de [79.235.122.145]) by mail.messagingengine.com (Postfix) with ESMTPA id 880BD240068; Mon, 1 Mar 2021 17:45:04 -0500 (EST) Received: by eve.qyliss.net (Postfix, from userid 1000) id BE669F1F; Mon, 1 Mar 2021 22:45:01 +0000 (UTC) From: Alyssa Ross To: ~qaul/community@lists.sr.ht Cc: Katharina Fey Subject: [PATCH v2] Fix some trivial warnings Date: Mon, 1 Mar 2021 22:45:00 +0000 Message-Id: <20210301224500.7013-1-hi@alyssa.is> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210301190634.2375-1-hi@alyssa.is> References: <20210301190634.2375-1-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit These were either unused imports or variables that did not need to be mutable. I've also changed libqaul-types entire test module to only be built with tests, so every import in it doesn't have to be #[cfg(test)]! --- In v2, I've fixed an issue where the libqaul-types RPC tests would fail to build because they expected ItemDiff to have been imported by super. libqaul/types/src/rpc/mod.rs | 1 + libqaul/types/src/rpc/tests.rs | 5 +---- netmods/netmod-tcp/src/lib.rs | 2 +- ratman/configure/src/config.rs | 2 +- ratman/configure/src/lib.rs | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libqaul/types/src/rpc/mod.rs b/libqaul/types/src/rpc/mod.rs index f646ef5a..f1f9082b 100644 --- a/libqaul/types/src/rpc/mod.rs +++ b/libqaul/types/src/rpc/mod.rs @@ -10,6 +10,7 @@ // mod error; // mod users; +#[cfg(test)] mod tests; // pub use error::ConvertError; diff --git a/libqaul/types/src/rpc/tests.rs b/libqaul/types/src/rpc/tests.rs index 997f5e88..0d852c74 100644 --- a/libqaul/types/src/rpc/tests.rs +++ b/libqaul/types/src/rpc/tests.rs @@ -1,8 +1,5 @@ -#[cfg(test)] -use super::*; - use crate::diff::ItemDiff; -use crate::users::{UserAuth, UserUpdate}; +use super::*; #[test] fn create_user() { diff --git a/netmods/netmod-tcp/src/lib.rs b/netmods/netmod-tcp/src/lib.rs index 52d54cb8..6fc96cf7 100644 --- a/netmods/netmod-tcp/src/lib.rs +++ b/netmods/netmod-tcp/src/lib.rs @@ -99,7 +99,7 @@ impl Endpoint { for p in peers.into_iter() { if &p == "" && continue {} - let mut parts: Vec<_> = p.split(|x| x == ' ').collect(); + let parts: Vec<_> = p.split(|x| x == ' ').collect(); let _type = parts.get(1); let peer = match parts[0].parse().ok() { Some(s) => s, diff --git a/ratman/configure/src/config.rs b/ratman/configure/src/config.rs index 4464d03b..9167ae43 100644 --- a/ratman/configure/src/config.rs +++ b/ratman/configure/src/config.rs @@ -3,7 +3,7 @@ use async_std::task::block_on; use ratman::Router; use std::collections::BTreeMap; -use std::{net::SocketAddr, ops::Deref, sync::Arc}; +use std::{ops::Deref, sync::Arc}; pub type Id = usize; diff --git a/ratman/configure/src/lib.rs b/ratman/configure/src/lib.rs index f9602107..0151937e 100644 --- a/ratman/configure/src/lib.rs +++ b/ratman/configure/src/lib.rs @@ -12,7 +12,7 @@ pub use parser::parse_json; pub mod config; use config::{Endpoint, Id, Network, Params}; -use std::{collections::BTreeMap, net::SocketAddr}; +use std::collections::BTreeMap; /// A rust API builder equivalent of the json parser /// -- 2.30.0