Skip to content

Commit

Permalink
prepare for edition 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Keruspe committed Aug 19, 2024
1 parent 58eed8f commit 143a1b4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 3 additions & 3 deletions tcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tcp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions types/src/generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ pub fn gen_flags<'a, W: Write + 'a>(f: &'a AMQPFlags) -> impl SerializeFn<W> + '
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)),
Expand Down
4 changes: 2 additions & 2 deletions types/tests/integration.rs
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down Expand Up @@ -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)));
}

0 comments on commit 143a1b4

Please sign in to comment.