Skip to content

Commit a70efac

Browse files
committed
Fix clippy warnings
1 parent 5de387d commit a70efac

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

code/crates/core-consensus/src/handle/signature.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ where
6262
Ok(result)
6363
}
6464

65+
// NOTE: Will be used again in #997
66+
#[allow(dead_code)]
6567
pub async fn verify_polka_certificate<Ctx>(
6668
co: &Co<Ctx>,
6769
certificate: PolkaCertificate<Ctx>,

code/crates/starknet/host/src/codec.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ impl Codec<CommitCertificate<MockContext>> for ProtobufCodec {
457457
}
458458
}
459459

460+
// NOTE: Will be used again in #997
461+
#[allow(dead_code)]
460462
pub(crate) fn encode_polka_certificate(
461463
certificate: &PolkaCertificate<MockContext>,
462464
) -> Result<proto::sync::PolkaCertificate, ProtoError> {
@@ -480,6 +482,8 @@ pub(crate) fn encode_polka_certificate(
480482
})
481483
}
482484

485+
// NOTE: Will be used again in #997
486+
#[allow(dead_code)]
483487
pub(crate) fn decode_polka_certificate(
484488
certificate: proto::sync::PolkaCertificate,
485489
) -> Result<PolkaCertificate<MockContext>, ProtoError> {
@@ -558,10 +562,14 @@ impl Codec<sync::RawDecidedValue<MockContext>> for ProtobufCodec {
558562
}
559563
}
560564

565+
// NOTE: Will be used again in #997
566+
#[allow(dead_code)]
561567
pub(crate) fn encode_vote(vote: &SignedVote<MockContext>) -> Result<proto::Vote, ProtoError> {
562568
vote.message.to_proto()
563569
}
564570

571+
// NOTE: Will be used again in #997
572+
#[allow(dead_code)]
565573
pub(crate) fn decode_vote(msg: proto::Vote) -> Result<SignedVote<MockContext>, ProtoError> {
566574
let signature = Signature::test();
567575
let vote = Vote::from_proto(msg)?;

code/examples/channel/src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ impl State {
410410
/// validators from the genesis validator set.
411411
pub fn get_validator_set(&self, height: Height) -> ValidatorSet {
412412
let num_validators = self.genesis.validator_set.len();
413-
let selection_size = (num_validators + 1) / 2;
413+
let selection_size = num_validators.div_ceil(2);
414414

415415
if num_validators <= selection_size {
416416
return self.genesis.validator_set.clone();

0 commit comments

Comments
 (0)