diff options
author | Satya Rohith <me@satyarohith.com> | 2024-06-14 17:10:57 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-14 17:10:57 +0530 |
commit | 0f48313565ed2620efbd9d0f2203b57f8f126e6a (patch) | |
tree | 39e348917188b7524eadc138dfcf80f92a185ac6 /cli/lsp/path_to_regex.rs | |
parent | e19ee6eecc416a99801231ac53f2c512ba1f81dd (diff) |
chore: upgrade to rust 1.79 (#24207)
Diffstat (limited to 'cli/lsp/path_to_regex.rs')
-rw-r--r-- | cli/lsp/path_to_regex.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/cli/lsp/path_to_regex.rs b/cli/lsp/path_to_regex.rs index 10cd651d8..88d8a2ec6 100644 --- a/cli/lsp/path_to_regex.rs +++ b/cli/lsp/path_to_regex.rs @@ -795,8 +795,6 @@ impl Compiler { #[derive(Debug)] pub struct MatchResult { - pub path: String, - pub index: usize, pub params: HashMap<StringOrNumber, StringOrVec>, } @@ -824,9 +822,6 @@ impl Matcher { /// Match a string path, optionally returning the match result. pub fn matches(&self, path: &str) -> Option<MatchResult> { let caps = self.re.captures(path).ok()??; - let m = caps.get(0)?; - let path = m.as_str().to_string(); - let index = m.start(); let mut params = HashMap::new(); if let Some(keys) = &self.maybe_keys { for (i, key) in keys.iter().enumerate() { @@ -852,11 +847,7 @@ impl Matcher { } } - Some(MatchResult { - path, - index, - params, - }) + Some(MatchResult { params }) } } |