refactor: clean up redundant serde aliases in tools schema
This commit is contained in:
1 parent
27416e4ee9
commit
2ae343d968
6 files changed
+171
-191
No files matched your search
@@ -29,11 +29,10 @@ fn test_eager_tools_parity() {
|
||||
let nvim_source =
|
||||
std::fs::read_to_string("../nvim-core/src/lib.rs").expect("Failed to read nvim lib.rs");
|
||||
let mut nvim_tools = HashSet::new();
|
||||
for line in nvim_source.lines() {
|
||||
if line.contains("\"name\": \"nvim_")
|
||||
&& let Some(start) = line.find("\"name\": \"")
|
||||
{
|
||||
let rest = &line[start + 9..];
|
||||
let parts: Vec<&str> = nvim_source.split("tool_def").collect();
|
||||
for part in parts.iter().skip(1) {
|
||||
if let Some(start) = part.find("(\"") {
|
||||
let rest = &part[start + 2..];
|
||||
if let Some(end) = rest.find('"') {
|
||||
nvim_tools.insert(rest[..end].to_string());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user