Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
Signed-off-by: Fullstop000 <[email protected]>
  • Loading branch information
Fullstop000 committed Jan 19, 2020
1 parent 5189128 commit 88f583e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl Sandbox {

fn new_storage(peers: Vec<u64>, snapshot_index: u64, last_index: u64) -> MemStorage {
let s = MemStorage::new_with_conf_state((peers.clone(), vec![]));
let snapshot = new_snapshot(snapshot_index, 1, peers.clone());
let snapshot = new_snapshot(snapshot_index, 1, peers);
s.wl().apply_snapshot(snapshot).unwrap();
if snapshot_index < last_index {
let mut ents = vec![];
Expand All @@ -214,7 +214,7 @@ fn new_storage_by_scenario(
let s = MemStorage::new_with_conf_state((peers.clone(), vec![]));
match scenario {
FollowerScenario::UpToDate => {
let snapshot = new_snapshot(snapshot_index, 1, peers.clone());
let snapshot = new_snapshot(snapshot_index, 1, peers);
s.wl().apply_snapshot(snapshot).unwrap();
let mut ents = vec![];
for index in snapshot_index + 1..last_index {
Expand All @@ -225,7 +225,7 @@ fn new_storage_by_scenario(
}
FollowerScenario::NeedEntries(index) => {
assert!(index > snapshot_index);
let snapshot = new_snapshot(snapshot_index, 1, peers.clone());
let snapshot = new_snapshot(snapshot_index, 1, peers);
s.wl().apply_snapshot(snapshot).unwrap();
let mut ents = vec![];
for i in snapshot_index + 1..index {
Expand Down Expand Up @@ -330,7 +330,7 @@ fn test_delegate_in_group_containing_leader() {
(3, FollowerScenario::Snapshot),
(4, FollowerScenario::UpToDate),
];
let mut sandbox = Sandbox::new(&l, 1, followers.clone(), group_config.clone(), 5, 10);
let mut sandbox = Sandbox::new(&l, 1, followers, group_config, 5, 10);

sandbox.propose(true);
let msgs = sandbox.leader_mut().read_messages();
Expand Down Expand Up @@ -636,7 +636,7 @@ fn test_follower_replication_with_inconsistent_progress_set() {
// only bcast to 4 even if the peer2 is in group system
assert_eq!(m.bcast_targets, vec![4]);

let mut sandbox = Sandbox::new(&l, 1, followers.clone(), group_config.clone(), 5, 20);
let mut sandbox = Sandbox::new(&l, 1, followers, group_config, 5, 20);
// Remove peer 2 from group system
sandbox.leader_mut().groups.remove_node(2);
sandbox.propose(false);
Expand Down
2 changes: 1 addition & 1 deletion harness/tests/integration_cases/test_raw_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ fn test_raw_node_read_index_to_old_leader() {
);
assert_eq!(
nt.peers[&1].msgs[1],
new_message_with_entries(3, 3, MessageType::MsgReadIndex, vec![test_entries.clone()])
new_message_with_entries(3, 3, MessageType::MsgReadIndex, vec![test_entries])
);
}

Expand Down

0 comments on commit 88f583e

Please sign in to comment.