diff --git a/globset/src/glob.rs b/globset/src/glob.rs index e327d998..c8dedba2 100644 --- a/globset/src/glob.rs +++ b/globset/src/glob.rs @@ -103,6 +103,14 @@ impl fmt::Display for Glob { } } +impl str::FromStr for Glob { + type Err = Error; + + fn from_str(glob: &str) -> Result { + Self::new(glob) + } +} + /// A matcher for a single pattern. #[derive(Clone, Debug)] pub struct GlobMatcher {