@@ -30,7 +30,6 @@ impl AmqpConnectionOptions {
3030 pub fn builder ( ) -> builders:: AmqpConnectionOptionsBuilder {
3131 builders:: AmqpConnectionOptionsBuilder :: new ( )
3232 }
33-
3433 pub fn max_frame_size ( & self ) -> Option < u32 > {
3534 self . max_frame_size
3635 }
@@ -124,47 +123,38 @@ pub mod builders {
124123 options : Default :: default ( ) ,
125124 }
126125 }
127- pub fn build ( & mut self ) -> AmqpConnectionOptions {
128- self . options . clone ( )
126+ pub fn build ( self ) -> AmqpConnectionOptions {
127+ self . options
129128 }
130- pub fn with_max_frame_size ( & mut self , max_frame_size : u32 ) -> & mut Self {
129+ pub fn with_max_frame_size ( mut self , max_frame_size : u32 ) -> Self {
131130 self . options . max_frame_size = Some ( max_frame_size) ;
132131 self
133132 }
134- pub fn with_channel_max ( & mut self , channel_max : u16 ) -> & mut Self {
133+ pub fn with_channel_max ( mut self , channel_max : u16 ) -> Self {
135134 self . options . channel_max = Some ( channel_max) ;
136135 self
137136 }
138- pub fn with_idle_timeout ( & mut self , idle_timeout : Duration ) -> & mut Self {
137+ pub fn with_idle_timeout ( mut self , idle_timeout : Duration ) -> Self {
139138 self . options . idle_timeout = Some ( idle_timeout) ;
140139 self
141140 }
142- pub fn with_outgoing_locales ( & mut self , outgoing_locales : Vec < String > ) -> & mut Self {
141+ pub fn with_outgoing_locales ( mut self , outgoing_locales : Vec < String > ) -> Self {
143142 self . options . outgoing_locales = Some ( outgoing_locales) ;
144143 self
145144 }
146- pub fn with_incoming_locales ( & mut self , incoming_locales : Vec < String > ) -> & mut Self {
145+ pub fn with_incoming_locales ( mut self , incoming_locales : Vec < String > ) -> Self {
147146 self . options . incoming_locales = Some ( incoming_locales) ;
148147 self
149148 }
150- pub fn with_offered_capabilities (
151- & mut self ,
152- offered_capabilities : Vec < AmqpSymbol > ,
153- ) -> & mut Self {
149+ pub fn with_offered_capabilities ( mut self , offered_capabilities : Vec < AmqpSymbol > ) -> Self {
154150 self . options . offered_capabilities = Some ( offered_capabilities) ;
155151 self
156152 }
157- pub fn with_desired_capabilities (
158- & mut self ,
159- desired_capabilities : Vec < AmqpSymbol > ,
160- ) -> & mut Self {
153+ pub fn with_desired_capabilities ( mut self , desired_capabilities : Vec < AmqpSymbol > ) -> Self {
161154 self . options . desired_capabilities = Some ( desired_capabilities) ;
162155 self
163156 }
164- pub fn with_properties < K , V > (
165- & mut self ,
166- properties : impl Into < AmqpOrderedMap < K , V > > ,
167- ) -> & mut Self
157+ pub fn with_properties < K , V > ( mut self , properties : impl Into < AmqpOrderedMap < K , V > > ) -> Self
168158 where
169159 K : Into < AmqpSymbol > + Debug + Default + PartialEq ,
170160 V : Into < AmqpValue > + Debug + Default ,
@@ -177,7 +167,7 @@ pub mod builders {
177167 self . options . properties = Some ( properties_map) ;
178168 self
179169 }
180- pub fn with_buffer_size ( & mut self , buffer_size : usize ) -> & mut Self {
170+ pub fn with_buffer_size ( mut self , buffer_size : usize ) -> Self {
181171 self . options . buffer_size = Some ( buffer_size) ;
182172 self
183173 }
0 commit comments