chore: add #[non_exhaustive] and mutation methods to improve compatibility (#715)
* chore: add #[non_exhaustive] to reduce backwards-incompatible changes going forward * fix: remove ProtocolVersion import * fix: add a few more with_ mutator methods --------- Co-authored-by: Alex Hancock <alexhancock@block.xyz>
This commit is contained in:
parent
79834b6211
commit
f63718d202
1 changed files with 1568 additions and 1110 deletions
|
|
@ -4,8 +4,8 @@ mod common;
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
use common::handlers::{TestClientHandler, TestServer};
|
||||
use rmcp::{ClientHandler, ServerHandler};
|
||||
use common::handlers::TestServer;
|
||||
use rmcp::ServerHandler;
|
||||
|
||||
#[test]
|
||||
fn test_wrapped_server_handlers() {
|
||||
|
|
@ -16,8 +16,11 @@ fn test_wrapped_server_handlers() {
|
|||
accepts_server_handler(Arc::new(TestServer::new()));
|
||||
}
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
#[test]
|
||||
fn test_wrapped_client_handlers() {
|
||||
use common::handlers::TestClientHandler;
|
||||
use rmcp::ClientHandler;
|
||||
// This test asserts that, when T: ClientHandler, both Box<T> and Arc<T> also implement ClientHandler.
|
||||
fn accepts_client_handler<H: ClientHandler>(_handler: H) {}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue