Commit dc18dc6
committed
Improve: remove
The `NodeId` type is currently defined as:
```rust
type NodeId: .. + Copy + .. + 'static;
```
This commit removes the `Copy` bound from `NodeId`.
This modification will allow the use of non-`Copy` types as `NodeId`,
providing greater flexibility for applications that prefer
variable-length strings or other non-`Copy` types for node
identification.
This change maintain compatibility by updating derived `Copy`
implementations with manual implementations:
```rust
// Before
#[derive(Copy...)]
pub struct LogId<NID: NodeId> {}
// After
impl<NID: Copy> Copy for LogId<NID> {}
```Copy bound from NodeId
1 parent acc8502 commit dc18dc6
File tree
43 files changed
+366
-336
lines changed- examples/memstore/src
- openraft/src
- core
- sm
- engine
- handler
- establish_handler
- following_handler
- leader_handler
- log_handler
- replication_handler
- server_state_handler
- snapshot_handler
- vote_handler
- entry
- log_id
- membership
- metrics
- network
- progress
- entry
- inflight
- proposer
- quorum
- raft_state
- membership_state
- raft
- message
- replication
- storage
- testing
- vote/leader_id
- tests/tests/fixtures
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
43 files changed
+366
-336
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
| 119 | + | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
0 commit comments