remove amqp arguments

These are not used anywhere and the table is a type specific to the amqp
library.
This commit is contained in:
Daiderd Jordan 2020-04-27 21:48:14 +02:00
parent bef27f6ab9
commit a87cf357d0
No known key found for this signature in database
GPG key ID: D02435D05B810C96
8 changed files with 4 additions and 51 deletions

View file

@ -39,7 +39,6 @@ fn main() {
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
internal: false, internal: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -52,7 +51,6 @@ fn main() {
exclusive: false, exclusive: false,
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap() .unwrap()
.queue .queue
@ -67,7 +65,6 @@ fn main() {
exclusive: true, exclusive: true,
auto_delete: true, auto_delete: true,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap() .unwrap()
.queue .queue
@ -79,7 +76,6 @@ fn main() {
exchange: "build-jobs".to_owned(), exchange: "build-jobs".to_owned(),
routing_key: None, routing_key: None,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -98,7 +94,6 @@ fn main() {
no_ack: false, no_ack: false,
no_wait: false, no_wait: false,
exclusive: false, exclusive: false,
arguments: None,
}, },
) )
.unwrap(); .unwrap();

View file

@ -27,7 +27,6 @@ fn main() {
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
internal: false, internal: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -39,7 +38,6 @@ fn main() {
exclusive: false, exclusive: false,
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -51,7 +49,6 @@ fn main() {
exclusive: false, exclusive: false,
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -61,7 +58,6 @@ fn main() {
exchange: "github-events".to_owned(), exchange: "github-events".to_owned(),
routing_key: Some("pull_request.nixos/nixpkgs".to_owned()), routing_key: Some("pull_request.nixos/nixpkgs".to_owned()),
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -78,7 +74,6 @@ fn main() {
no_ack: false, no_ack: false,
no_wait: false, no_wait: false,
exclusive: false, exclusive: false,
arguments: None,
}, },
) )
.unwrap(); .unwrap();

View file

@ -26,7 +26,6 @@ fn main() {
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
internal: false, internal: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -39,7 +38,6 @@ fn main() {
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
internal: false, internal: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -51,7 +49,6 @@ fn main() {
exclusive: false, exclusive: false,
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -61,7 +58,6 @@ fn main() {
exchange: "github-events".to_owned(), exchange: "github-events".to_owned(),
routing_key: Some("issue_comment.*".to_owned()), routing_key: Some("issue_comment.*".to_owned()),
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -79,7 +75,6 @@ fn main() {
no_ack: false, no_ack: false,
no_wait: false, no_wait: false,
exclusive: false, exclusive: false,
arguments: None,
}, },
) )
.unwrap(); .unwrap();

View file

@ -23,7 +23,6 @@ fn main() {
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
internal: false, internal: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -35,7 +34,6 @@ fn main() {
exclusive: false, exclusive: false,
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -45,7 +43,6 @@ fn main() {
exchange: "build-results".to_owned(), exchange: "build-results".to_owned(),
routing_key: None, routing_key: None,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -62,7 +59,6 @@ fn main() {
no_ack: false, no_ack: false,
no_wait: false, no_wait: false,
exclusive: false, exclusive: false,
arguments: None,
}, },
) )
.unwrap(); .unwrap();

View file

@ -25,7 +25,6 @@ fn main() {
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
internal: false, internal: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -37,7 +36,6 @@ fn main() {
exclusive: true, exclusive: true,
auto_delete: true, auto_delete: true,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap() .unwrap()
.queue; .queue;
@ -48,7 +46,6 @@ fn main() {
exchange: "logs".to_owned(), exchange: "logs".to_owned(),
routing_key: Some("*.*".to_owned()), routing_key: Some("*.*".to_owned()),
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -65,7 +62,6 @@ fn main() {
no_ack: false, no_ack: false,
no_wait: false, no_wait: false,
exclusive: false, exclusive: false,
arguments: None,
}, },
) )
.unwrap(); .unwrap();

View file

@ -61,7 +61,6 @@ fn main() {
exclusive: false, exclusive: false,
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -76,7 +75,6 @@ fn main() {
no_ack: false, no_ack: false,
no_wait: false, no_wait: false,
exclusive: false, exclusive: false,
arguments: None,
}, },
) )
.unwrap(); .unwrap();

View file

@ -35,7 +35,6 @@ fn main() {
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
internal: false, internal: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -47,7 +46,6 @@ fn main() {
exclusive: false, exclusive: false,
auto_delete: false, auto_delete: false,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -57,7 +55,6 @@ fn main() {
exchange: "stats".to_owned(), exchange: "stats".to_owned(),
routing_key: None, routing_key: None,
no_wait: false, no_wait: false,
arguments: None,
}) })
.unwrap(); .unwrap();
@ -72,7 +69,6 @@ fn main() {
no_ack: false, no_ack: false,
no_wait: false, no_wait: false,
exclusive: false, exclusive: false,
arguments: None,
}, },
) )
.unwrap(); .unwrap();

View file

@ -41,10 +41,6 @@ pub struct ConsumeConfig {
/// complete the method it will raise a channel or connection /// complete the method it will raise a channel or connection
/// exception. /// exception.
pub no_wait: bool, pub no_wait: bool,
/// A set of arguments for the consume. The syntax and semantics
/// of these arguments depends on the server implementation.
pub arguments: Option<amqp::Table>,
} }
pub struct BindQueueConfig { pub struct BindQueueConfig {
@ -88,10 +84,6 @@ pub struct BindQueueConfig {
/// complete the method it will raise a channel or connection /// complete the method it will raise a channel or connection
/// exception. /// exception.
pub no_wait: bool, pub no_wait: bool,
/// A set of arguments for the binding. The syntax and semantics
/// of these arguments depends on the exchange class.
pub arguments: Option<amqp::Table>,
} }
pub enum ExchangeType { pub enum ExchangeType {
@ -192,11 +184,6 @@ pub struct ExchangeConfig {
/// complete the method it will raise a channel or connection /// complete the method it will raise a channel or connection
/// exception. /// exception.
pub no_wait: bool, pub no_wait: bool,
/// A set of arguments for the declaration. The syntax and
/// semantics of these arguments depends on the server
/// implementation.
pub arguments: Option<amqp::Table>,
} }
pub struct QueueConfig { pub struct QueueConfig {
@ -274,11 +261,6 @@ pub struct QueueConfig {
/// complete the method it will raise a channel or connection /// complete the method it will raise a channel or connection
/// exception. /// exception.
pub no_wait: bool, pub no_wait: bool,
/// A set of arguments for the declaration. The syntax and
/// semantics of these arguments depends on the server
/// implementation.
pub arguments: Option<amqp::Table>,
} }
pub fn session_from_config(config: &RabbitMQConfig) -> Result<amqp::Session, amqp::AMQPError> { pub fn session_from_config(config: &RabbitMQConfig) -> Result<amqp::Session, amqp::AMQPError> {
@ -348,7 +330,7 @@ impl TypedWrappers for amqp::Channel {
config.no_ack, config.no_ack,
config.exclusive, config.exclusive,
config.no_wait, config.no_wait,
config.arguments.unwrap_or_else(amqp::Table::new), amqp::Table::new(),
) )
} }
@ -364,7 +346,7 @@ impl TypedWrappers for amqp::Channel {
config.auto_delete, config.auto_delete,
config.internal, config.internal,
config.no_wait, config.no_wait,
config.arguments.unwrap_or_else(amqp::Table::new), amqp::Table::new(),
) )
} }
@ -379,7 +361,7 @@ impl TypedWrappers for amqp::Channel {
config.exclusive, config.exclusive,
config.auto_delete, config.auto_delete,
config.no_wait, config.no_wait,
config.arguments.unwrap_or_else(amqp::Table::new), amqp::Table::new(),
) )
} }
@ -392,7 +374,7 @@ impl TypedWrappers for amqp::Channel {
config.exchange, config.exchange,
config.routing_key.unwrap_or_else(|| "".to_owned()), config.routing_key.unwrap_or_else(|| "".to_owned()),
config.no_wait, config.no_wait,
config.arguments.unwrap_or_else(amqp::Table::new), amqp::Table::new(),
) )
} }
} }