Skip to content

Commit

Permalink
fix incorrect filter logic (#1360)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlaineHeffron authored Jun 6, 2024
1 parent 7f8116d commit 6ce6259
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/crates/soroban-spec-typescript/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub fn generate(spec: &[ScSpecEntry]) -> String {
// Filter out function entries with names that start with "__" and partition the results
let (fns, other): (Vec<_>, Vec<_>) = collected
.into_iter()
.filter(|entry| matches!(entry, Entry::Function { name, .. } if !name.starts_with("__")))
.filter(|entry| !matches!(entry, Entry::Function { name, .. } if name.starts_with("__")))
.partition(|entry| matches!(entry, Entry::Function { .. }));
let top = other.iter().map(entry_to_method_type).join("\n");
let bottom = generate_class(&fns, spec);
Expand Down

0 comments on commit 6ce6259

Please sign in to comment.