@@ -1142,9 +1142,7 @@ pub fn list_plugins_across_cluster(client: APIClient) -> ClientResult<Vec<Plugin
11421142//
11431143
11441144pub fn declare_vhost ( client : APIClient , command_args : & ArgMatches ) -> ClientResult < ( ) > {
1145- // the flag is required
11461145 let name = command_args. get_one :: < String > ( "name" ) . unwrap ( ) ;
1147- // these are optional
11481146 let description = command_args
11491147 . get_one :: < String > ( "description" )
11501148 . map ( |s| s. as_str ( ) ) ;
@@ -1173,9 +1171,7 @@ pub fn declare_exchange(
11731171 vhost : & str ,
11741172 command_args : & ArgMatches ,
11751173) -> Result < ( ) , CommandRunError > {
1176- // the flag is required
11771174 let name = command_args. get_one :: < String > ( "name" ) . unwrap ( ) ;
1178- // these are optional
11791175 let exchange_type = command_args
11801176 . get_one :: < ExchangeType > ( "type" )
11811177 . cloned ( )
@@ -1305,7 +1301,6 @@ pub fn delete_global_parameter(client: APIClient, command_args: &ArgMatches) ->
13051301}
13061302
13071303pub fn delete_vhost ( client : APIClient , command_args : & ArgMatches ) -> ClientResult < ( ) > {
1308- // the flag is required
13091304 let name = command_args. get_one :: < String > ( "name" ) . unwrap ( ) ;
13101305 let idempotently = command_args
13111306 . get_one :: < bool > ( "idempotently" )
@@ -1413,7 +1408,6 @@ pub fn delete_multiple_vhosts(
14131408}
14141409
14151410pub fn delete_user ( client : APIClient , command_args : & ArgMatches ) -> ClientResult < ( ) > {
1416- // the flag is required
14171411 let name = command_args. get_one :: < String > ( "name" ) . unwrap ( ) ;
14181412 let idempotently = command_args
14191413 . get_one :: < bool > ( "idempotently" )
@@ -1427,7 +1421,6 @@ pub fn delete_permissions(
14271421 vhost : & str ,
14281422 command_args : & ArgMatches ,
14291423) -> ClientResult < ( ) > {
1430- // the flag is required
14311424 let user = command_args. get_one :: < String > ( "user" ) . unwrap ( ) ;
14321425 let idempotently = command_args
14331426 . get_one :: < bool > ( "idempotently" )
@@ -1512,11 +1505,9 @@ pub fn declare_queue(
15121505 vhost : & str ,
15131506 command_args : & ArgMatches ,
15141507) -> Result < ( ) , CommandRunError > {
1515- // the flag is required
15161508 let name = command_args. get_one :: < String > ( "name" ) . unwrap ( ) ;
15171509 let queue_type = command_args. get_one :: < QueueType > ( "type" ) . cloned ( ) . unwrap ( ) ;
15181510
1519- // these are optional
15201511 let durable = command_args
15211512 . get_one :: < bool > ( "durable" )
15221513 . cloned ( )
@@ -1973,7 +1964,6 @@ pub fn declare_global_parameter(
19731964}
19741965
19751966pub fn delete_queue ( client : APIClient , vhost : & str , command_args : & ArgMatches ) -> ClientResult < ( ) > {
1976- // the flag is required
19771967 let name = command_args. get_one :: < String > ( "name" ) . unwrap ( ) ;
19781968 let idempotently = command_args
19791969 . get_one :: < bool > ( "idempotently" )
@@ -2026,7 +2016,6 @@ pub fn delete_exchange(
20262016 vhost : & str ,
20272017 command_args : & ArgMatches ,
20282018) -> ClientResult < ( ) > {
2029- // the flag is required
20302019 let name = command_args. get_one :: < String > ( "name" ) . unwrap ( ) ;
20312020 let idempotent = command_args
20322021 . get_one :: < bool > ( "idempotently" )
@@ -2040,7 +2029,6 @@ pub fn delete_policy(
20402029 vhost : & str ,
20412030 command_args : & ArgMatches ,
20422031) -> ClientResult < ( ) > {
2043- // the flag is required
20442032 let name = command_args. get_one :: < String > ( "name" ) . unwrap ( ) ;
20452033 let idempotently = command_args
20462034 . get_one :: < bool > ( "idempotently" )
@@ -2054,7 +2042,6 @@ pub fn delete_operator_policy(
20542042 vhost : & str ,
20552043 command_args : & ArgMatches ,
20562044) -> ClientResult < ( ) > {
2057- // the flag is required
20582045 let name = command_args. get_one :: < String > ( "name" ) . unwrap ( ) ;
20592046 let idempotently = command_args
20602047 . get_one :: < bool > ( "idempotently" )
@@ -2064,7 +2051,6 @@ pub fn delete_operator_policy(
20642051}
20652052
20662053pub fn purge_queue ( client : APIClient , vhost : & str , command_args : & ArgMatches ) -> ClientResult < ( ) > {
2067- // the flag is required
20682054 let name = command_args. get_one :: < String > ( "name" ) . unwrap ( ) ;
20692055 client. purge_queue ( vhost, name)
20702056}
@@ -2085,7 +2071,6 @@ pub fn health_check_port_listener(
20852071 client : APIClient ,
20862072 command_args : & ArgMatches ,
20872073) -> ClientResult < ( ) > {
2088- // the flag is required
20892074 let port = command_args. get_one :: < u16 > ( "port" ) . cloned ( ) . unwrap ( ) ;
20902075 client. health_check_port_listener ( port)
20912076}
@@ -2094,7 +2079,6 @@ pub fn health_check_protocol_listener(
20942079 client : APIClient ,
20952080 command_args : & ArgMatches ,
20962081) -> ClientResult < ( ) > {
2097- // the flag is required
20982082 let proto = command_args
20992083 . get_one :: < SupportedProtocol > ( "protocol" )
21002084 . cloned ( )
@@ -2103,7 +2087,6 @@ pub fn health_check_protocol_listener(
21032087}
21042088
21052089pub fn close_connection ( client : APIClient , command_args : & ArgMatches ) -> ClientResult < ( ) > {
2106- // the flag is required
21072090 let name = command_args. get_one :: < String > ( "name" ) . unwrap ( ) ;
21082091 let idempotently = command_args
21092092 . get_one :: < bool > ( "idempotently" )
@@ -2113,7 +2096,6 @@ pub fn close_connection(client: APIClient, command_args: &ArgMatches) -> ClientR
21132096}
21142097
21152098pub fn close_user_connections ( client : APIClient , command_args : & ArgMatches ) -> ClientResult < ( ) > {
2116- // the flag is required
21172099 let username = command_args. get_one :: < String > ( "username" ) . unwrap ( ) ;
21182100 let idempotently = command_args
21192101 . get_one :: < bool > ( "idempotently" )
0 commit comments