@@ -157,15 +157,15 @@ struct StrDescPubKeyTranslator<'a>(usize, &'a PubData);
157
157
158
158
impl < ' a > Translator < String , DescriptorPublicKey , ( ) > for StrDescPubKeyTranslator < ' a > {
159
159
fn pk ( & mut self , pk_str : & String ) -> Result < DescriptorPublicKey , ( ) > {
160
- let avail = !pk_str. ends_with ( "!" ) ;
160
+ let avail = !pk_str. ends_with ( '!' ) ;
161
161
if avail {
162
162
self . 0 = self . 0 + 1 ;
163
- if pk_str. starts_with ( "K" ) {
163
+ if pk_str. starts_with ( 'K' ) {
164
164
Ok ( DescriptorPublicKey :: Single ( SinglePub {
165
165
origin : None ,
166
166
key : SinglePubKey :: FullKey ( self . 1 . pks [ self . 0 ] ) ,
167
167
} ) )
168
- } else if pk_str. starts_with ( "X" ) {
168
+ } else if pk_str. starts_with ( 'X' ) {
169
169
Ok ( DescriptorPublicKey :: Single ( SinglePub {
170
170
origin : None ,
171
171
key : SinglePubKey :: XOnly ( self . 1 . x_only_pks [ self . 0 ] ) ,
@@ -210,15 +210,15 @@ struct StrTranslatorLoose<'a>(usize, &'a PubData);
210
210
211
211
impl < ' a > Translator < String , DescriptorPublicKey , ( ) > for StrTranslatorLoose < ' a > {
212
212
fn pk ( & mut self , pk_str : & String ) -> Result < DescriptorPublicKey , ( ) > {
213
- let avail = !pk_str. ends_with ( "!" ) ;
213
+ let avail = !pk_str. ends_with ( '!' ) ;
214
214
if avail {
215
215
self . 0 = self . 0 + 1 ;
216
- if pk_str. starts_with ( "K" ) {
216
+ if pk_str. starts_with ( 'K' ) {
217
217
Ok ( DescriptorPublicKey :: Single ( SinglePub {
218
218
origin : None ,
219
219
key : SinglePubKey :: FullKey ( self . 1 . pks [ self . 0 ] ) ,
220
220
} ) )
221
- } else if pk_str. starts_with ( "X" ) {
221
+ } else if pk_str. starts_with ( 'X' ) {
222
222
Ok ( DescriptorPublicKey :: Single ( SinglePub {
223
223
origin : None ,
224
224
key : SinglePubKey :: XOnly ( self . 1 . x_only_pks [ self . 0 ] ) ,
0 commit comments