Skip to content

Commit

Permalink
s/Lazy<GlobMatcher>/Lazy<Option<GlobMatcher>>/
Browse files Browse the repository at this point in the history
  • Loading branch information
cyqsimon committed Nov 4, 2023
1 parent 69c5054 commit 0725760
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/syntax_mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl MappingTarget {
#[derive(Clone, Debug, PartialEq, Eq, Hash, DeserializeFromStr)]
/// A single matcher.
///
/// Codegen converts this into a `Lazy<GlobMatcher>`.
/// Codegen converts this into a `Lazy<Option<GlobMatcher>>`.
struct Matcher(Vec<MatcherSegment>);
/// Parse a matcher.
///
Expand Down
6 changes: 3 additions & 3 deletions src/syntax_mapping/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ include!(concat!(
///
/// A failure to compile is a fatal error.
///
/// Used internally by `Lazy<GlobMatcher>`'s lazy evaluation closure.
/// Used internally by `Lazy<Option<GlobMatcher>>`'s lazy evaluation closure.
fn build_matcher_fixed(from: &str) -> GlobMatcher {
make_glob_matcher(from).expect("A builtin fixed glob matcher failed to compile")
}
Expand All @@ -63,7 +63,7 @@ fn build_matcher_fixed(from: &str) -> GlobMatcher {
/// Returns `None` if any replacement fails, or if the joined glob string fails
/// to compile.
///
/// Used internally by `Lazy<GlobMatcher>`'s lazy evaluation closure.
/// Used internally by `Lazy<Option<GlobMatcher>>`'s lazy evaluation closure.
fn build_matcher_dynamic(segs: &[MatcherSegment]) -> Option<GlobMatcher> {
// join segments
let mut buf = String::new();
Expand All @@ -83,7 +83,7 @@ fn build_matcher_dynamic(segs: &[MatcherSegment]) -> Option<GlobMatcher> {

/// A segment of a dynamic builtin matcher.
///
/// Used internally by `Lazy<GlobMatcher>`'s lazy evaluation closure.
/// Used internally by `Lazy<Option<GlobMatcher>>`'s lazy evaluation closure.
#[derive(Clone, Debug)]
enum MatcherSegment {
Text(&'static str),
Expand Down

0 comments on commit 0725760

Please sign in to comment.