diff --git a/protocol/Cargo.toml b/protocol/Cargo.toml index b18b7ebf..46e9ceb6 100644 --- a/protocol/Cargo.toml +++ b/protocol/Cargo.toml @@ -18,7 +18,7 @@ name = "amq_protocol" [features] default = ["rustls"] codegen = ["codegen-internal"] -codegen-internal = ["amq-protocol-codegen"] +codegen-internal = ["dep:amq-protocol-codegen"] native-tls = ["amq-protocol-tcp/native-tls"] openssl = ["amq-protocol-tcp/openssl"] rustls = ["amq-protocol-tcp/rustls"] diff --git a/tcp/Cargo.toml b/tcp/Cargo.toml index 52f91dd4..acb3455c 100644 --- a/tcp/Cargo.toml +++ b/tcp/Cargo.toml @@ -19,9 +19,9 @@ default = ["rustls"] native-tls = ["tcp-stream/native-tls"] openssl = ["tcp-stream/openssl"] rustls = ["rustls-native-certs", "rustls--aws_lc_rs"] -rustls-native-certs = ["rustls-connector", "tcp-stream/rustls-native-certs"] -rustls-webpki-roots-certs = ["rustls-connector", "tcp-stream/rustls-webpki-roots-certs"] -rustls-connector = ["tcp-stream/rustls-connector"] +rustls-native-certs = ["rustls-common", "tcp-stream/rustls-native-certs"] +rustls-webpki-roots-certs = ["rustls-common", "tcp-stream/rustls-webpki-roots-certs"] +rustls-common = ["tcp-stream/rustls-common"] vendored-openssl = ["tcp-stream/vendored-openssl"] # rustls crypto providers. Choose at least one. Otherwise, runtime errors. diff --git a/tcp/src/lib.rs b/tcp/src/lib.rs index b8178813..815a0ca2 100644 --- a/tcp/src/lib.rs +++ b/tcp/src/lib.rs @@ -21,7 +21,7 @@ pub use tcp_stream::NativeTlsConnector; #[cfg(feature = "openssl")] pub use tcp_stream::OpenSslConnector; -#[cfg(feature = "rustls-connector")] +#[cfg(feature = "rustls-common")] pub use tcp_stream::{RustlsConnector, RustlsConnectorConfig}; /// Trait providing a method to connect to a TcpStream diff --git a/types/src/generation.rs b/types/src/generation.rs index 9c20ae42..dc6a85e4 100644 --- a/types/src/generation.rs +++ b/types/src/generation.rs @@ -183,12 +183,12 @@ pub fn gen_flags<'a, W: Write + 'a>(f: &'a AMQPFlags) -> impl SerializeFn + ' mod test { use super::*; - use cookie_factory::gen; + use cookie_factory::r#gen as cf_gen; macro_rules! test_gen ( ($buf: expr, $gen: ident, $val: expr) => ({ let buf = $buf; - let len = gen($gen($val), &mut buf[..]).map(|t| t.1); + let len = cf_gen($gen($val), &mut buf[..]).map(|t| t.1); match len { Err(e) => Err(format!("{:?}", e)), Ok(len) => Ok((buf.to_vec(), len)), diff --git a/types/tests/integration.rs b/types/tests/integration.rs index a1f2f908..92771075 100644 --- a/types/tests/integration.rs +++ b/types/tests/integration.rs @@ -1,6 +1,6 @@ use amq_protocol_types::{generation::gen_value, parsing::parse_value, *}; -use cookie_factory::gen; +use cookie_factory::r#gen as cf_gen; #[test] fn test_full_integration() { @@ -43,7 +43,7 @@ fn test_full_integration() { let value = AMQPValue::FieldTable(table); let mut buf: [u8; 199] = [0; 199]; - gen(gen_value(&value), &mut buf[..]).unwrap(); + cf_gen(gen_value(&value), &mut buf[..]).unwrap(); assert_eq!(parse_value(&buf[..]), Ok((&[][..], value))); }