tikv / raft-rs

Raft distributed consensus algorithm implemented in Rust.
Apache License 2.0
2.86k stars 391 forks source link

Revoke pub from maybe_append #508

Closed tisonkun closed 1 year ago

tisonkun commented 1 year ago

This can be related to https://github.com/tikv/raft-rs/issues/35.

pub(crate) should be enough.

BTW, some methods are pub only for accessing in benches. I don't know if conditional export tech like below is worthy:

#[cfg(benches)]
pub fn bench_campaign(&mut self, campaign_type: &'static [u8]) {
  self.campaign(campaign_type)
}

fn campaign(&mut self, campaign_type: &'static [u8]) {

#[cfg(benches)] has no magic over a normal feature that we manually turn on when running benches.

tisonkun commented 1 year ago

Closing...

TiKV depends on its pub.