Skip to content

Commit 1072764

Browse files
cdesouza-chromiummkarolin
authored andcommitted
[cr133][rust] Fix unused imports in brave code
This warning is now enabled for all chromium code, and it has been triggered with some of the zcash code. Additionally, this change has to correct a lot of the formatting for that file, which seems to have changed considerably. Chromium change: https://chromium.googlesource.com/chromium/src/+/6f81efe9a3d000dcbc952d6f14284c8178a960ec commit 6f81efe9a3d000dcbc952d6f14284c8178a960ec Author: Lukasz Anforowicz <[email protected]> Date: Thu Jan 2 13:45:03 2025 -0800 Stop globally disabling `unused-imports` lint when compiling Rust. rust-lang/rust#121708 (comment) points out that new linting scenarios have been moved into a separate lint. Thanks to this, we no longer need to globally disable this lint in Chromium (some narrower exclusions still need to apply). Bug: chromium:326247202
1 parent d1da4c5 commit 1072764

File tree

1 file changed

+2
-11
lines changed
  • components/brave_wallet/browser/zcash/rust

1 file changed

+2
-11
lines changed

components/brave_wallet/browser/zcash/rust/lib.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
// You can obtain one at https://mozilla.org/MPL/2.0/.
55

66
use std::{
7-
cell::RefCell, cmp::{Ord, Ordering},
87
collections::BTreeSet, convert::TryFrom, error, fmt, io::Cursor, marker::PhantomData,
9-
ops::{Add, Bound, RangeBounds, Sub}, rc::Rc, vec};
8+
vec};
109

1110
use orchard::{
1211
builder:: {
1312
BuildError as OrchardBuildError, InProgress, Unauthorized, Unproven
14-
}, bundle::{commitments, Bundle},
13+
}, bundle::Bundle,
1514
keys::{FullViewingKey as OrchardFVK,
1615
PreparedIncomingViewingKey,
1716
Scope as OrchardScope, SpendingKey},
@@ -36,7 +35,6 @@ use zcash_primitives::{
3635
transaction::components::amount::Amount};
3736

3837
use incrementalmerkletree::{
39-
frontier::{self, Frontier},
4038
Address,
4139
Position,
4240
Retention};
@@ -50,7 +48,6 @@ use zcash_note_encryption::{
5048
};
5149

5250
use shardtree::{
53-
error::ShardTreeError,
5451
store::{Checkpoint, ShardStore, TreeState},
5552
LocatedPrunableTree, LocatedTree, PrunableTree, RetentionFlags,
5653
ShardTree,
@@ -67,18 +64,14 @@ use crate::ffi::{
6764
CxxOrchardShardTreeCap,
6865
CxxOrchardCheckpoint,
6966
CxxOrchardCheckpointBundle,
70-
CxxOrchardCheckpointRetention,
7167
CxxOrchardShard,
7268
CxxOrchardCompactAction,
7369
CxxOrchardOutput,
7470
CxxOrchardSpend,
75-
CxxOrchardShardTreeLeaf,
7671
CxxOrchardShardTreeLeafs,
7772
CxxOrchardShardTreeState
7873
};
7974

80-
use shardtree::error::QueryError;
81-
8275
// The rest of the wallet code should be updated to use this version of unwrap
8376
// and then this code can be removed
8477
#[macro_export]
@@ -115,8 +108,6 @@ macro_rules! impl_result {
115108
};
116109
}
117110

118-
use paste::item;
119-
120111
macro_rules! impl_result_option_wrapper {
121112
($t: ty, $rt: ident, $l: ident) => {
122113
paste::item! {

0 commit comments

Comments
 (0)