Refactor: Extract render_summary from render_impl.#86128
Merged
bors merged 1 commit intorust-lang:masterfrom Jun 9, 2021
Merged
Refactor: Extract render_summary from render_impl.#86128bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
This allows for a more readable straight-through logic in render_impl without need for a closure.
GuillaumeGomez
approved these changes
Jun 8, 2021
Member
|
Thanks! @bors: r+ |
Collaborator
|
📌 Commit 1c0ecd4 has been approved by |
the8472
reviewed
Jun 8, 2021
| write!( | ||
| w, | ||
| "<div id=\"{}\" class=\"impl has-srclink\"{}>\ | ||
| <code class=\"in-band\">{}</code>", |
Contributor
Author
There was a problem hiding this comment.
Good suggestion, thanks! I think we use non-raw strings in rustdoc to minimize whitespace (by putting \ at the end of the line). Also, I hope to introduce the use of a templating engine soonish, which would make things even more readable.
Member
There was a problem hiding this comment.
I confirm that we don't use raw strings to generate smaller content.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 9, 2021
Rollup of 11 pull requests Successful merges: - rust-lang#85676 (Fix documentation style inconsistencies for IP addresses) - rust-lang#85715 (Document `From` impls in string.rs) - rust-lang#85791 (Add `Ipv6Addr::is_unicast`) - rust-lang#85957 (Display defaults on const params- rustdoc ) - rust-lang#85982 (Enable rustdoc to document safe wasm intrinsics) - rust-lang#86121 (Forwarding implementation for Seek trait's stream_position method) - rust-lang#86124 (Include macro name in 'local ambiguity' error) - rust-lang#86128 (Refactor: Extract render_summary from render_impl.) - rust-lang#86142 (Simplify proc_macro code using Bound::cloned().) - rust-lang#86158 (Update books) - rust-lang#86159 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows for a more readable straight-through logic in render_impl without need for a closure.
I think this will make #85970 a bit more of a straightforward change.
This is a pure refactoring. I've verified that the output of
x.py doc library/stdis byte-for-byte identical.r? @GuillaumeGomez