Skip to content

Commit 72d83ed

Browse files
committed
fix(cargo,dart): handle multi-byte chars and wildcard version matching
Cargo parser: adjust search_start to char boundary when slicing content for dependency name lookup, preventing panic on files containing multi-byte UTF-8 characters. Dart version: treat "*" as wildcard (alias for "any") to match the convention used by deps-lsp core when fetching latest versions.
1 parent 08e7626 commit 72d83ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/deps-dart/src/version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn compare_versions(a: &str, b: &str) -> Ordering {
3232
pub fn version_matches_constraint(version: &str, constraint: &str) -> bool {
3333
let constraint = constraint.trim();
3434

35-
if constraint.is_empty() || constraint == "any" {
35+
if constraint.is_empty() || constraint == "any" || constraint == "*" {
3636
return true;
3737
}
3838

0 commit comments

Comments
 (0)