From fb90063ae95361d56ebfef4055a8fe6ef8f4486c Mon Sep 17 00:00:00 2001 From: tottoto Date: Fri, 16 Feb 2024 18:49:28 +0900 Subject: [PATCH] refactor(lib): move request and response trait bound assertion to test --- src/lib.rs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d05f7b63..3e8fd876 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -195,13 +195,19 @@ pub use crate::status::StatusCode; pub use crate::uri::Uri; pub use crate::version::Version; -fn _assert_types() { - fn assert_send() {} - fn assert_sync() {} +#[cfg(test)] +mod tests { + use super::*; + + fn assert_send_sync() {} - assert_send::>(); - assert_send::>(); + #[test] + fn request_satisfies_send_sync() { + assert_send_sync::>(); + } - assert_sync::>(); - assert_sync::>(); + #[test] + fn response_satisfies_send_sync() { + assert_send_sync::>(); + } }