소스 검색

Derive clone, debug and default for snapshot.

Jing Yang 4 년 전
부모
커밋
afcba31d87
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/snapshot.rs

+ 1 - 0
src/snapshot.rs

@@ -2,6 +2,7 @@ use crate::{Index, Raft};
 use crossbeam_utils::sync::{Parker, Unparker};
 use std::sync::atomic::Ordering;
 
+#[derive(Clone, Debug, Default)]
 pub struct Snapshot {
     pub last_included_index: Index,
     pub data: Vec<u8>,