File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1191,22 +1191,22 @@ impl Builder {
1191
1191
1192
1192
/// Don't derive `PartialEq` for a given type. Regular
1193
1193
/// expressions are supported.
1194
- pub fn no_partialeq ( mut self , arg : String ) -> Builder {
1195
- self . options . no_partialeq_types . insert ( arg) ;
1194
+ pub fn no_partialeq < T : Into < String > > ( mut self , arg : T ) -> Builder {
1195
+ self . options . no_partialeq_types . insert ( arg. into ( ) ) ;
1196
1196
self
1197
1197
}
1198
1198
1199
1199
/// Don't derive `Copy` for a given type. Regular
1200
1200
/// expressions are supported.
1201
- pub fn no_copy ( mut self , arg : String ) -> Self {
1202
- self . options . no_copy_types . insert ( arg) ;
1201
+ pub fn no_copy < T : Into < String > > ( mut self , arg : T ) -> Self {
1202
+ self . options . no_copy_types . insert ( arg. into ( ) ) ;
1203
1203
self
1204
1204
}
1205
1205
1206
1206
/// Don't derive `Hash` for a given type. Regular
1207
1207
/// expressions are supported.
1208
- pub fn no_hash ( mut self , arg : String ) -> Builder {
1209
- self . options . no_hash_types . insert ( arg) ;
1208
+ pub fn no_hash < T : Into < String > > ( mut self , arg : T ) -> Builder {
1209
+ self . options . no_hash_types . insert ( arg. into ( ) ) ;
1210
1210
self
1211
1211
}
1212
1212
}
Original file line number Diff line number Diff line change @@ -589,19 +589,19 @@ where
589
589
590
590
if let Some ( no_partialeq) = matches. values_of ( "no-partialeq" ) {
591
591
for regex in no_partialeq {
592
- builder = builder. no_partialeq ( String :: from ( regex) ) ;
592
+ builder = builder. no_partialeq ( regex) ;
593
593
}
594
594
}
595
595
596
596
if let Some ( no_copy) = matches. values_of ( "no-copy" ) {
597
597
for regex in no_copy {
598
- builder = builder. no_copy ( String :: from ( regex) ) ;
598
+ builder = builder. no_copy ( regex) ;
599
599
}
600
600
}
601
601
602
602
if let Some ( no_hash) = matches. values_of ( "no-hash" ) {
603
603
for regex in no_hash {
604
- builder = builder. no_hash ( String :: from ( regex) ) ;
604
+ builder = builder. no_hash ( regex) ;
605
605
}
606
606
}
607
607
You can’t perform that action at this time.
0 commit comments