Nearest property name by edit distance, for did-you-mean suggestions.
(key: &str, props: &Map<String, Value>)
| 452 | |
| 453 | /// Nearest property name by edit distance, for did-you-mean suggestions. |
| 454 | fn nearest_key(key: &str, props: &Map<String, Value>) -> Option<String> { |
| 455 | nearest_by_edit_distance(key, props.keys().cloned()) |
| 456 | } |
| 457 | |
| 458 | /// Nearest tool name (short form) for unknown-tool suggestions. |
| 459 | pub(crate) fn nearest_tool_name(canonical: &str, defs: &[ToolDefinition]) -> Option<String> { |
no test coverage detected