Skip to content

Commit 0e3f915

Browse files
committed
Fix rust warning for unused variables
1 parent 154b64b commit 0e3f915

File tree

3 files changed

+9
-20
lines changed

3 files changed

+9
-20
lines changed

rust/suibase/crates/common/src/basic_types/acoins_client.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use anyhow::Result;
2-
use chrono::{Local, Utc};
2+
use chrono::Utc;
33
use std::path::Path;
44

55
// Run autocoins proof-of-installation protocol for the client.
@@ -81,7 +81,7 @@ use reqwest::Client;
8181

8282
use crate::log_safe_err;
8383

84-
use super::{StatusState, StatusYaml, UserKeypair, ACOINS_PROTOCOL_VERSION_LATEST};
84+
use super::{StatusYaml, UserKeypair, ACOINS_PROTOCOL_VERSION_LATEST};
8585
pub struct ACoinsClient {
8686
client: Client,
8787
}
@@ -104,8 +104,8 @@ impl ACoinsClient {
104104

105105
async fn run_network_protocol(
106106
&mut self,
107-
status_yaml: &mut StatusYaml,
108-
user_keypair: &UserKeypair,
107+
_status_yaml: &mut StatusYaml,
108+
_user_keypair: &UserKeypair,
109109
) -> Result<()> {
110110
// Run the login+verify+download protocol (see integration_tests.rs: test_verification() for example).
111111
Ok(())
@@ -143,9 +143,7 @@ impl ACoinsClient {
143143
let now = Utc::now();
144144

145145
#[cfg(any(test, feature = "integration-tests"))]
146-
{
147-
148-
}
146+
{}
149147
// Do not attempt to run the protocol if last attempt was less than 1 hour ago.
150148
status.last_verification_attempt = Some(now);
151149
match self.run_network_protocol(&mut status, &user_keypair).await {
@@ -164,7 +162,7 @@ impl ACoinsClient {
164162
}
165163

166164
// Update percent_downloaded.
167-
let storage_dir = autocoins_dir.as_ref().join("data");
165+
let _storage_dir = autocoins_dir.as_ref().join("data");
168166

169167
// If status.yaml deposit_address is not matching the configuration, then
170168
// force the status to the configured address and show a deposit of 0.

rust/suibase/crates/common/src/basic_types/acoins_user_keypair.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ use std::path::Path;
22

33
use base64ct::{Base64UrlUnpadded, Encoding as Base64Encoding};
44
use secrecy::{ExposeSecret, SecretBox};
5-
use tokio::fs;
65
use zeroize::{Zeroize, ZeroizeOnDrop};
76

87
use fastcrypto::{
98
ed25519::Ed25519KeyPair,
10-
encoding::{Base58, Encoding as FastCryptoEncoding, Hex},
9+
encoding::{Base58, Encoding as FastCryptoEncoding},
1110
traits::{KeyPair, Signer, ToFromBytes},
1211
};
1312
use rand::rngs::StdRng;

rust/suibase/crates/suibase-daemon/src/acoins_monitor.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
use std::{
2-
path::Path,
3-
time::{Duration, SystemTime, UNIX_EPOCH},
4-
};
1+
use std::path::Path;
52

6-
use chrono::Local;
73
use common::{basic_types::*, log_safe};
8-
use fastcrypto::{
9-
encoding::{Base58, Encoding},
10-
traits::{KeyPair, ToFromBytes},
11-
};
124

135
use crate::shared_types::{GlobalsWorkdirConfigMT, GlobalsWorkdirStatusMT};
146

15-
use anyhow::{anyhow, Context, Result};
7+
use anyhow::{anyhow, Result};
168
use tokio_graceful_shutdown::{FutureExt, SubsystemHandle};
179

1810
// Design

0 commit comments

Comments
 (0)