File tree Expand file tree Collapse file tree 4 files changed +7
-17
lines changed Expand file tree Collapse file tree 4 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -157,11 +157,6 @@ impl LSPS5AppName {
157157 pub fn as_str ( & self ) -> & str {
158158 self
159159 }
160-
161- /// Convert the app name to a string
162- pub fn to_string ( & self ) -> String {
163- self . 0 . 0 . clone ( )
164- }
165160}
166161
167162impl Deref for LSPS5AppName {
@@ -244,11 +239,6 @@ impl LSPS5WebhookUrl {
244239 pub fn as_str ( & self ) -> & str {
245240 self
246241 }
247-
248- /// Convert the webhook URL to a string
249- pub fn to_string ( & self ) -> String {
250- self . 0 . url ( ) . to_string ( )
251- }
252242}
253243
254244impl Deref for LSPS5WebhookUrl {
Original file line number Diff line number Diff line change @@ -147,8 +147,9 @@ impl LSPS5ServiceHandler {
147147 client_has_open_channel : Box < dyn Fn ( & PublicKey ) -> bool > , config : LSPS5ServiceConfig ,
148148 time_provider : Option < Arc < dyn TimeProvider > > ,
149149 ) -> Option < Self > {
150- let Some ( time_provider) = time_provider else {
151- return None ;
150+ let time_provider = match time_provider {
151+ Some ( provider) => provider,
152+ None => return None ,
152153 } ;
153154 Some ( Self {
154155 config,
Original file line number Diff line number Diff line change @@ -43,11 +43,10 @@ impl LSPSUrl {
4343 return Err ( ( ) ) ;
4444 }
4545
46- let host_section =
47- remainder. split ( |c| c == '/' || c == '?' || c == '#' ) . next ( ) . ok_or_else ( || ( ) ) ?;
46+ let host_section = remainder. split ( [ '/' , '?' , '#' ] ) . next ( ) . ok_or_else ( || ( ) ) ?;
4847
4948 let host_without_auth =
50- host_section. split ( '@' ) . last ( ) . filter ( |s| !s. is_empty ( ) ) . ok_or_else ( || ( ) ) ?;
49+ host_section. split ( '@' ) . next_back ( ) . filter ( |s| !s. is_empty ( ) ) . ok_or_else ( || ( ) ) ?;
5150
5251 if host_without_auth. is_empty ( ) {
5352 return Err ( ( ) ) ;
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ where {
186186 ) ;
187187
188188 #[ cfg( not( feature = "time" ) ) ]
189- return LSPS5ClientHandler :: _new_with_custom_time_provider (
189+ return LSPS5ClientHandler :: new_with_custom_time_provider (
190190 entropy_source. clone ( ) ,
191191 Arc :: clone ( & pending_messages) ,
192192 Arc :: clone ( & pending_events) ,
@@ -231,7 +231,7 @@ where {
231231 ) ;
232232
233233 #[ cfg( not( feature = "time" ) ) ]
234- return LSPS5ServiceHandler :: _new_with_custom_time_provider (
234+ return LSPS5ServiceHandler :: new_with_custom_time_provider (
235235 Arc :: clone ( & pending_events) ,
236236 Arc :: clone ( & pending_messages) ,
237237 client_has_open_channels,
You can’t perform that action at this time.
0 commit comments