Commit e86400e
committed
Fix panic in remove_node for Definition nodes
Definition nodes store their name in the `export` field, not the `name`
field (which is None). The log::debug! in remove_node incorrectly used
`node.name.as_ref().unwrap()`, which panics for Definition nodes.
Changed to `node.export.as_ref().unwrap()`, matching the pattern used
elsewhere (e.g., the Display impl at line 1324).
Added a unit test that verifies remove_node works correctly for type
definition nodes.1 parent e1e684a commit e86400e
1 file changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1029 | 1029 | | |
1030 | 1030 | | |
1031 | 1031 | | |
1032 | | - | |
| 1032 | + | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
| |||
1959 | 1959 | | |
1960 | 1960 | | |
1961 | 1961 | | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
1962 | 1980 | | |
0 commit comments