From 21525c0ad768914786c92b8a65ccf7baa42b13a6 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Fri, 4 Mar 2011 19:32:39 +0000 Subject: cosmetic --- src/rabbit_basic.erl | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/rabbit_basic.erl') diff --git a/src/rabbit_basic.erl b/src/rabbit_basic.erl index 57aad808..8c930502 100644 --- a/src/rabbit_basic.erl +++ b/src/rabbit_basic.erl @@ -44,7 +44,7 @@ -spec(message/3 :: (rabbit_exchange:name(), rabbit_router:routing_key(), rabbit_types:decoded_content()) -> - rabbit_types:ok_or_error2(rabbit_types:message(), any())). + rabbit_types:ok_or_error2(rabbit_types:message(), any())). -spec(properties/1 :: (properties_input()) -> rabbit_framing:amqp_property_record()). -spec(publish/4 :: @@ -107,21 +107,21 @@ strip_header(#content{properties = Props = #'P_basic'{headers = Headers}} false -> DecodedContent; {value, Found} -> Headers0 = lists:delete(Found, Headers), rabbit_binary_generator:clear_encoded_content( - DecodedContent#content{ - properties = Props#'P_basic'{ - headers = Headers0}}) + DecodedContent#content{ + properties = Props#'P_basic'{ + headers = Headers0}}) end. message(ExchangeName, RoutingKey, #content{properties = Props} = DecodedContent) -> try {ok, #basic_message{ - exchange_name = ExchangeName, - content = strip_header(DecodedContent, ?DELETED_HEADER), - guid = rabbit_guid:guid(), - is_persistent = is_message_persistent(DecodedContent), - routing_keys = [RoutingKey | - header_routes(Props#'P_basic'.headers)]}} + exchange_name = ExchangeName, + content = strip_header(DecodedContent, ?DELETED_HEADER), + guid = rabbit_guid:guid(), + is_persistent = is_message_persistent(DecodedContent), + routing_keys = [RoutingKey | + header_routes(Props#'P_basic'.headers)]}} catch {error, _Reason} = Error -> Error end. @@ -180,10 +180,10 @@ header_routes(undefined) -> []; header_routes(HeadersTable) -> lists:append( - [case rabbit_misc:table_lookup(HeadersTable, HeaderKey) of - {array, Routes} -> [Route || {longstr, Route} <- Routes]; - undefined -> []; - {Type, _Val} -> throw({error, {unacceptable_type_in_header, - Type, - binary_to_list(HeaderKey)}}) - end || HeaderKey <- ?ROUTING_HEADERS]). + [case rabbit_misc:table_lookup(HeadersTable, HeaderKey) of + {array, Routes} -> [Route || {longstr, Route} <- Routes]; + undefined -> []; + {Type, _Val} -> throw({error, {unacceptable_type_in_header, + Type, + binary_to_list(HeaderKey)}}) + end || HeaderKey <- ?ROUTING_HEADERS]). -- cgit v1.2.1 From e80b3162f252dcda613583ef2e6b271b0c5c4deb Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Fri, 4 Mar 2011 19:49:17 +0000 Subject: cosmetic - comment indentation --- src/rabbit_basic.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rabbit_basic.erl') diff --git a/src/rabbit_basic.erl b/src/rabbit_basic.erl index 8c930502..f9a8ee1d 100644 --- a/src/rabbit_basic.erl +++ b/src/rabbit_basic.erl @@ -175,7 +175,7 @@ is_message_persistent(#content{properties = #'P_basic'{ Other -> throw({error, {delivery_mode_unknown, Other}}) end. -% Extract CC routes from headers +%% Extract CC routes from headers header_routes(undefined) -> []; header_routes(HeadersTable) -> -- cgit v1.2.1