aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ssr
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-29 16:39:51 +0100
committerGitHub <[email protected]>2020-06-29 16:39:51 +0100
commit4da0a78c4e65e4abc5ca4ae1ed879e4e86737c9e (patch)
tree2bbefd6c7b7ad012a1e26f066ed87d716a484387 /crates/ra_ssr
parent32ee06032785ea1792144f7263cbce93a4de467b (diff)
parent95d67ec40174ec1c344ab39eee414d7a41a36af0 (diff)
Merge #5126
5126: Use more of FxHash* r=matklad a=lnicola ``` -rwxr-xr-x 1 me me 37917528 Jun 29 17:26 /home/me/.cargo/bin/rust-analyzer -rwxr-xr-x 1 me me 37904056 Jun 29 18:14 /home/me/.cargo/bin/rust-analyzer ``` Saved 13.5 KB there :-). Co-authored-by: LaurenČ›iu Nicola <[email protected]>
Diffstat (limited to 'crates/ra_ssr')
-rw-r--r--crates/ra_ssr/src/parsing.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ssr/src/parsing.rs b/crates/ra_ssr/src/parsing.rs
index 90c13dbc2..1ae166d19 100644
--- a/crates/ra_ssr/src/parsing.rs
+++ b/crates/ra_ssr/src/parsing.rs
@@ -165,7 +165,7 @@ fn parse_pattern(pattern_str: &str) -> Result<Vec<PatternElement>, SsrError> {
165/// Checks for errors in a rule. e.g. the replace pattern referencing placeholders that the search 165/// Checks for errors in a rule. e.g. the replace pattern referencing placeholders that the search
166/// pattern didn't define. 166/// pattern didn't define.
167fn validate_rule(rule: &SsrRule) -> Result<(), SsrError> { 167fn validate_rule(rule: &SsrRule) -> Result<(), SsrError> {
168 let mut defined_placeholders = std::collections::HashSet::new(); 168 let mut defined_placeholders = FxHashSet::default();
169 for p in &rule.pattern.raw.tokens { 169 for p in &rule.pattern.raw.tokens {
170 if let PatternElement::Placeholder(placeholder) = p { 170 if let PatternElement::Placeholder(placeholder) = p {
171 defined_placeholders.insert(&placeholder.ident); 171 defined_placeholders.insert(&placeholder.ident);