Skip to content

Commit 272b0e3

Browse files
committed
fix build
1 parent c945915 commit 272b0e3

File tree

31 files changed

+43
-51
lines changed

31 files changed

+43
-51
lines changed

src/catalyst-toolbox/catalyst-toolbox/src/rewards/veterans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ mod tests {
233233
.zip(REPUTATION_DISAGREEMENT_MODIFIERS)
234234
.collect(),
235235
);
236-
assert!(results.get(VCA_1).is_none());
236+
assert!(!results.contains_key(VCA_1));
237237
let res = results.get(VCA_2).unwrap();
238238
assert_eq!(res.reputation, 2);
239239
assert_eq!(res.rewards, total_rewards);

src/catalyst-toolbox/catalyst-toolbox/src/rewards/voters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ mod tests {
291291

292292
for (_, voting_key) in inactive_voters_keys {
293293
for contrib in snapshot.contributions_for_voting_key(voting_key.clone()) {
294-
assert!(all_rewards.get(&contrib.reward_address).is_none());
294+
assert!(!all_rewards.contains_key(&contrib.reward_address));
295295
}
296296
}
297297
}

src/chain-libs/cardano-legacy-address/src/base58.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ fn base_decode(alphabet_s: &str, input: &[u8]) -> Result<Vec<u8>> {
105105
//pub fn decode_bytes(input: &[u8]) -> Result<Vec<u8>> {
106106
// base_decode(ALPHABET, input)
107107
//}
108-
109108
#[cfg(test)]
110109
mod tests {
111110
fn encode(input: &[u8], expected: &str) {

src/chain-libs/chain-impl-mockchain/src/accounting/account/last_rewards.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ mod tests {
100100
#[test]
101101
#[should_panic]
102102
pub fn add_for_value_overflow() {
103-
let value_to_add = Value(std::u64::MAX);
103+
let value_to_add = Value(u64::MAX);
104104
let epoch = 0;
105105
let mut last_rewards = LastRewards {
106106
epoch: 0,
107-
reward: Value(std::u64::MAX),
107+
reward: Value(u64::MAX),
108108
};
109109
last_rewards.add_for(epoch, value_to_add);
110110
}

src/chain-libs/chain-impl-mockchain/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![warn(clippy::all)]
21
#![allow(clippy::derive_partial_eq_without_eq)]
32
#![allow(clippy::result_large_err)]
43

src/chain-libs/chain-impl-mockchain/src/multisig/witness.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ impl WitnessBuilder {
143143
}
144144

145145
/// Verify that the declaration and the witnesses in parameters fulfill the requirements:
146-
///
147146
/// * The threshold is met: there's at least T or more witnesses available
148147
/// * the witnesses and declaration together can re-create
149148
pub fn verify_identifier_threshold(

src/chain-libs/chain-impl-mockchain/src/rewards.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl Parameters {
150150
initial_value: 0,
151151
compounding_ratio: Ratio::zero(),
152152
compounding_type: CompoundingType::Linear,
153-
epoch_rate: NonZeroU32::new(u32::max_value()).unwrap(),
153+
epoch_rate: NonZeroU32::new(u32::MAX).unwrap(),
154154
epoch_start: 0,
155155
reward_drawing_limit_max: Limit::None,
156156
pool_participation_capping: None,

src/chain-libs/chain-impl-mockchain/src/transaction/witness.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ impl AsRef<[u8]> for WitnessMultisigData {
143143

144144
impl Witness {
145145
/// Creates new `Witness` value.
146-
147146
pub fn new_utxo_data(
148147
block0: &HeaderId,
149148
sign_data_hash: &TransactionSignDataHash,

src/chain-libs/chain-impl-mockchain/src/value.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ impl Value {
2727
Value(0)
2828
}
2929

30-
pub fn sum<I>(values: I) -> Result<Self, ValueError>
30+
pub fn sum<I>(mut values: I) -> Result<Self, ValueError>
3131
where
3232
I: Iterator<Item = Self>,
3333
{
34-
values.fold(Ok(Value::zero()), |acc, v| acc? + v)
34+
values.try_fold(Value::zero(), |acc, v| acc + v)
3535
}
3636

3737
#[inline]

src/chain-libs/chain-impl-mockchain/src/vote/manager.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,6 @@ mod tests {
12901290

12911291
#[test]
12921292
#[cfg(not(feature = "audit"))]
1293-
12941293
pub fn vote_plan_manager_tally_invalid_date_private() {
12951294
let (
12961295
members,

0 commit comments

Comments
 (0)