From 0fea82cff9da575e4dd297cdbc9c20569b0aa88e Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Thu, 2 Nov 2023 20:35:58 +0800 Subject: [PATCH] Minor improvement of variable naming accuracy --- build/syntax_mapping.rs | 6 +++--- src/syntax_mapping/builtins/README.md | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build/syntax_mapping.rs b/build/syntax_mapping.rs index c5efadc4..719d7966 100644 --- a/build/syntax_mapping.rs +++ b/build/syntax_mapping.rs @@ -172,10 +172,10 @@ impl MappingDefModel { let list = self .mappings .into_iter() - .flat_map(|(target, matcher)| { - matcher + .flat_map(|(target, matchers)| { + matchers .into_iter() - .map(|rule| (rule, target.clone())) + .map(|matcher| (matcher, target.clone())) .collect::>() }) .collect(); diff --git a/src/syntax_mapping/builtins/README.md b/src/syntax_mapping/builtins/README.md index 43721071..c6208b25 100644 --- a/src/syntax_mapping/builtins/README.md +++ b/src/syntax_mapping/builtins/README.md @@ -51,7 +51,8 @@ handle things like [XDG](https://specifications.freedesktop.org/basedir-spec/lat All environment variables intended to be replaced at runtime must be enclosed in `${}`, for example `"/foo/*/${YOUR_ENV}-suffix/*.log"`. Note that this is the **only** admissible syntax; other variable substitution syntaxes are not -supported and are thus treated as plain text. +supported and will either cause a compile time error, or be treated as plain +text. For example, if `foo-application` also supports per-user configuration files, we could write something like this: