• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

databendlabs / openraft / 11338749553

15 Oct 2024 03:08AM UTC coverage: 83.551%. First build
11338749553

push

github

drmingdrmer
Refactor: remove `Copy` bound from `NodeId`

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> {}
```

117 of 122 new or added lines in 27 files covered. (95.9%)

8132 of 9733 relevant lines covered (83.55%)

22.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.44
/openraft/src/engine/engine_impl.rs


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc