summaryrefslogtreecommitdiffstats
path: root/src/function.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-05-22 21:37:24 +0800
committerGitHub <noreply@github.com>2024-05-22 21:37:24 +0800
commit50b13d2de9c5573108f4b1c26306ad674ebb9f80 (patch)
tree2fff9f731f526da449dd50e99663308a71e34fed /src/function.rs
parentba3bcfd67c1d6fea5d3d3c5908c975682ee7909b (diff)
downloadaichat-50b13d2de9c5573108f4b1c26306ad674ebb9f80.tar.gz
refactor: rename `function_filter` to `function_matcher` (#535)
Diffstat (limited to 'src/function.rs')
-rw-r--r--src/function.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/function.rs b/src/function.rs
index f2eb0c6..a644185 100644
--- a/src/function.rs
+++ b/src/function.rs
@@ -126,9 +126,9 @@ impl Function {
})
}
- pub fn filtered_declarations(&self, filter: Option<&str>) -> Option<Vec<FunctionDeclaration>> {
- let filter = filter?;
- let regex = Regex::new(&format!("^({filter})$")).ok()?;
+ pub fn select(&self, matcher: Option<&str>) -> Option<Vec<FunctionDeclaration>> {
+ let matcher = matcher?;
+ let regex = Regex::new(&format!("^({matcher})$")).ok()?;
let output: Vec<FunctionDeclaration> = self
.declarations
.iter()