File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -488,8 +488,8 @@ impl fmt::Display for Pattern {
488
488
impl FromStr for Pattern {
489
489
type Err = PatternError ;
490
490
491
- fn from_str ( s : & str ) -> Result < Pattern , PatternError > {
492
- Pattern :: new ( s)
491
+ fn from_str ( s : & str ) -> Result < Self , PatternError > {
492
+ Self :: new ( s)
493
493
}
494
494
}
495
495
@@ -525,7 +525,7 @@ impl Pattern {
525
525
/// This function compiles Unix shell style patterns.
526
526
///
527
527
/// An invalid glob pattern will yield a `PatternError`.
528
- pub fn new ( pattern : & str ) -> Result < Pattern , PatternError > {
528
+ pub fn new ( pattern : & str ) -> Result < Self , PatternError > {
529
529
530
530
let chars = pattern. chars ( ) . collect :: < Vec < _ > > ( ) ;
531
531
let mut tokens = Vec :: new ( ) ;
@@ -632,7 +632,7 @@ impl Pattern {
632
632
}
633
633
}
634
634
635
- Ok ( Pattern {
635
+ Ok ( Self {
636
636
tokens,
637
637
original : pattern. to_string ( ) ,
638
638
is_recursive,
@@ -981,8 +981,8 @@ impl MatchOptions {
981
981
/// require_literal_leading_dot: false
982
982
/// }
983
983
/// ```
984
- pub fn new ( ) -> MatchOptions {
985
- MatchOptions {
984
+ pub fn new ( ) -> Self {
985
+ Self {
986
986
case_sensitive : true ,
987
987
require_literal_separator : false ,
988
988
require_literal_leading_dot : false ,
You can’t perform that action at this time.
0 commit comments