diff options
author | David Tolnay <dtolnay@gmail.com> | 2024-02-28 10:45:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 10:45:02 -0800 |
commit | c34817539ef92cb3cb4d9e6ffedb1a7f94f9874a (patch) | |
tree | 946bb664defca37748122705f5b3700251a8c5d1 | |
parent | 7eef56220b05c70be3756a3baa98fe19c4093d02 (diff) | |
parent | eabcb3178eceed12f556eaf0510a86ec5dfd441b (diff) | |
download | cxx-c34817539ef92cb3cb4d9e6ffedb1a7f94f9874a.tar.gz |
Merge pull request #1320 from phil-opp/use-correct-methods
Fix: Use correct methods when writing toposorted structs
-rw-r--r-- | gen/src/write.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gen/src/write.rs b/gen/src/write.rs index 8eef0a76..89037e16 100644 --- a/gen/src/write.rs +++ b/gen/src/write.rs @@ -85,10 +85,10 @@ fn write_data_structures<'a>(out: &mut OutFile<'a>, apis: &'a [Api]) { match api { Api::Struct(strct) if !structs_written.contains(&strct.name.rust) => { for next in &mut toposorted_structs { - if !out.types.cxx.contains(&strct.name.rust) { + if !out.types.cxx.contains(&next.name.rust) { out.next_section(); let methods = methods_for_type - .get(&strct.name.rust) + .get(&next.name.rust) .map(Vec::as_slice) .unwrap_or_default(); write_struct(out, next, methods); |