-
Couldn't load subscription status.
- Fork 13.9k
Some graphviz tweaks #132346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some graphviz tweaks #132346
Conversation
Because it's a `ResultsCursor`, not a `Results`. I find this easier to read and understand.
`Formatter` currently has a `RefCell<Option<Results>>` field. This is so the `Results` can be temporarily taken and put into a `ResultsCursor` that is used by `BlockFormatter`, and then put back, which is messy. This commit changes `Formatter` to have a `RefCell<ResultsCursor>` and `BlockFormatter` to have a `&mut ResultsCursor`, which greatly simplifies the code at the `Formatter`/`BlockFormatter` interaction point in `Formatter::node_label`. It also means we construct a `ResultsCursor` once per `Formatter`, instead of once per `node_label` call. The commit also: - documents the reason for the `RefCell`; - adds a `Formatter::body` method, replacing the `Formatter::body` field.
Instead of appending an empty label. Because it's conceptually simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk if u want @cjgillot to look at this as well
|
One r+ is enough, thanks! @bors r=lcnr rollup |
|
@bors r+ rollup |
|
💡 This pull request was already approved, no need to approve it again.
|
Rollup of 6 pull requests Successful merges: - rust-lang#130098 (Reject generic self types.) - rust-lang#131096 (rustdoc: Remove usage of `allow(unused)` attribute on `no_run` merged doctests) - rust-lang#132315 (compiletest: improve robustness of LLVM version handling) - rust-lang#132346 (Some graphviz tweaks) - rust-lang#132359 (Fix AIX libc call char type from i8 to u8) - rust-lang#132360 (Un-vacation myself) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132346 - nnethercote:some-graphviz-tweaks, r=cjgillot Some graphviz tweaks r? `@cjgillot`
Instead of `ResultsCursor`. This partly undoes the second commit from rust-lang#132346; possible because `Results::as_result_cursor` (which doesn't consume the `Results`) is now available. Delaying the `ResultsCursor` construction will facilitate the next couple of commits.
…, r=compiler-errors Some more graphviz tweaks A follow-up to rust-lang#132346. r? `@davidtwco`
Rollup merge of rust-lang#140142 - nnethercote:some-graphviz-tweaks-2, r=compiler-errors Some more graphviz tweaks A follow-up to rust-lang#132346. r? `@davidtwco`
r? @cjgillot