Skip to content

Commit e2e8a62

Browse files
authored
Derive Clone and Debug for EndpointState types (#263)
This ensures that `Client` implements both traits.
1 parent d32a540 commit e2e8a62

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/client.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,21 @@ pub trait EndpointState: private::EndpointStateSealed {}
2121

2222
/// [Typestate](https://cliffle.com/blog/rust-typestate/) indicating that an endpoint has not been
2323
/// set and cannot be used.
24+
#[derive(Clone, Debug)]
2425
pub struct EndpointNotSet;
2526
impl EndpointState for EndpointNotSet {}
2627
impl private::EndpointStateSealed for EndpointNotSet {}
2728

2829
/// [Typestate](https://cliffle.com/blog/rust-typestate/) indicating that an endpoint has been set
2930
/// and is ready to be used.
31+
#[derive(Clone, Debug)]
3032
pub struct EndpointSet;
3133
impl EndpointState for EndpointSet {}
3234
impl private::EndpointStateSealed for EndpointSet {}
3335

3436
/// [Typestate](https://cliffle.com/blog/rust-typestate/) indicating that an endpoint may have been
3537
/// set and can be used via fallible methods.
38+
#[derive(Clone, Debug)]
3639
pub struct EndpointMaybeSet;
3740
impl EndpointState for EndpointMaybeSet {}
3841
impl private::EndpointStateSealed for EndpointMaybeSet {}

0 commit comments

Comments
 (0)