tikv / raft-rs

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

chore: readability for take read state #520

Closed tisonkun closed 1 year ago

tisonkun commented 1 year ago

It's more clear than mem::swap cause it doesn't depend on that rd.read_state happens to be empty.

Semantically we take the read state from node to ready, not swap.

tisonkun commented 1 year ago

trivial to merge

Thanks for your review!