chore: add #[non_exhaustive] to remaining public structs (#768)
* chore: add #[non_exhaustive] to remaining public structs * chore: add #[non_exhaustive] to remaining public types * chore: enable exhaustive_structs/enums clippy lints * test: add untagged ServerResult deserialization regression tests
This commit is contained in:
parent
ee1c63c53f
commit
6a3b32d3ab
1 changed files with 430 additions and 211 deletions
|
|
@ -1458,20 +1458,15 @@ async fn test_peer_request_options_timeout() {
|
|||
|
||||
let timeout = Some(Duration::from_secs(15));
|
||||
|
||||
let options = PeerRequestOptions {
|
||||
timeout,
|
||||
meta: None,
|
||||
};
|
||||
let mut options = PeerRequestOptions::default();
|
||||
options.timeout = timeout;
|
||||
|
||||
// Verify timeout is properly stored
|
||||
assert_eq!(options.timeout, timeout);
|
||||
assert!(options.meta.is_none());
|
||||
|
||||
// Test with no timeout
|
||||
let options_no_timeout = PeerRequestOptions {
|
||||
timeout: None,
|
||||
meta: None,
|
||||
};
|
||||
let options_no_timeout = PeerRequestOptions::default();
|
||||
|
||||
assert!(options_no_timeout.timeout.is_none());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue