Procházet zdrojové kódy

Mark LogArray and VerifyAuthorityResult as crate-private types.

Jing Yang před 2 roky
rodič
revize
c6d3ce06f3
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      src/log_array.rs
  2. 1 1
      src/verify_authority.rs

+ 1 - 1
src/log_array.rs

@@ -36,7 +36,7 @@ enum LogEntryEnum<Command> {
 }
 
 #[derive(Clone, Debug, Serialize, Deserialize)]
-pub struct LogEntry<Command> {
+pub(crate) struct LogEntry<Command> {
     pub index: Index,
     pub term: Term,
     command: LogEntryEnum<Command>,

+ 1 - 1
src/verify_authority.rs

@@ -14,7 +14,7 @@ use crate::{Index, Raft, Term};
 /// This request is not directly exposed to end users. Instead it is used
 /// internally to implement no-commit read-only requests.
 #[derive(Debug, Eq, PartialEq)]
-pub enum VerifyAuthorityResult {
+pub(crate) enum VerifyAuthorityResult {
     Success(Index),
     TermElapsed,
     TimedOut,