Skip to content

Commit

Permalink
docs: fix "sploded" formatting (#771)
Browse files Browse the repository at this point in the history
## Motivation

PR #769 was merged with some incorrect docs formatting due to
incorrect HTML that resulted from overzealous find-and-replace
misuse. See #769 (review)

## Solution

This PR un-splodes it.

Signed-off-by: Eliza Weisman <[email protected]>
  • Loading branch information
hawkw authored Jun 30, 2020
1 parent 8c0ef97 commit c4a6a6d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 25 deletions.
7 changes: 4 additions & 3 deletions tracing-core/src/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@
//! </div>
//! <div class="example-wrap" style="display:inline-block">
//! <pre class="ignore" style="white-space:normal;font:inherit;">
//! <strong>Note</strong>:the thread-local scoped dispatcher <code>with_default</code>
//! requires the Rust standard library. <code>no_std</code> users should use
//! <strong>Note</strong>:the thread-local scoped dispatcher
//! (<a href="#fn.with_default"><code>with_default</code></a>) requires the
//! Rust standard library. <code>no_std</code> users should use
//! <a href="#fn.set_global_default"><code>set_global_default</code></a>
//! instead.
//! </pre></div>
Expand Down Expand Up @@ -559,7 +560,7 @@ impl Dispatch {
/// <strong>Deprecated</strong>: The <a href="#method.try_close"><code>try_close</code></a>
/// method is functionally identical, but returns <code>true</code> if the span is now closed.
/// It should be used instead of this method.
/// </pre>
/// </pre></div>
///
/// [span ID]: ../span/struct.Id.html
/// [`Subscriber`]: ../subscriber/trait.Subscriber.html
Expand Down
7 changes: 2 additions & 5 deletions tracing-core/src/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub struct Iter {
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: The <code>record_error</code> trait method is only
/// available when the Rust standard library is present, as it requires the `
/// available when the Rust standard library is present, as it requires the
/// <code>std::error::Error</code> trait.
/// </pre></div>
///
Expand Down Expand Up @@ -213,7 +213,6 @@ pub trait Visit {
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: This is only enabled when the Rust standard library is
/// present.
Expand Down Expand Up @@ -622,16 +621,14 @@ impl FieldSet {
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: If <code>field</code> shares a name with a field
/// in this <code>FieldSet</code>, but was created by a <code>FieldSet</code>
/// with a different callsite, this <code>FieldSet</code> does <em>not</em>
/// contain it. This is so that if two separate span callsites define a field
/// named "foo", the <code>Field</code> corresponding to "foo" for each
/// of those callsites are not equivalent.
/// </pre>
/// </div>
/// </pre></div>
pub fn contains(&self, field: &Field) -> bool {
field.callsite() == self.callsite() && field.i <= self.len()
}
Expand Down
1 change: 0 additions & 1 deletion tracing-core/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ impl Id {
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: Span IDs must be greater than zero.</pre></div>
///
Expand Down
21 changes: 7 additions & 14 deletions tracing-subscriber/src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ where
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: This method (and <a href="#method.enabled">
/// <code>Layer::enabled</code></a>) determine whether a span or event is
Expand All @@ -229,7 +228,7 @@ where
/// <a href="#method.on_enter"><code>on_enter</code></a>,
/// <a href="#method.on_exit"><code>on_exit<code></a>, and other notification
/// methods.
/// </pre>
/// </pre></div>
///
/// See [the trait-level documentation] for more information on filtering
/// with `Layer`s.
Expand Down Expand Up @@ -269,7 +268,6 @@ where
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: This method (and <a href="#method.register_callsite">
/// <code>Layer::register_callsite</code></a>) determine whether a span or event is
Expand All @@ -282,7 +280,7 @@ where
/// <a href="#method.on_enter"><code>on_enter</code></a>,
/// <a href="#method.on_exit"><code>on_exit<code></a>, and other notification
/// methods.
/// </pre>
/// </pre></div>
///
///
/// See [the trait-level documentation] for more information on filtering
Expand Down Expand Up @@ -874,13 +872,12 @@ impl<'a, S: Subscriber> Context<'a, S> {
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: This requires the wrapped subscriber to implement the
/// <a href="../registry/trait.LookupSpan.html"><code>LookupSpan</code></a> trait.
/// <code>Layer</code> implementations that wish to use this
/// function can bound their <code>Subscriber</code> type parameter with:
/// </pre>
/// </pre></div>
/// ```rust,ignore
/// where S: Subscriber + for<'a> LookupSpan<'a>,`
/// ```
Expand All @@ -904,13 +901,12 @@ impl<'a, S: Subscriber> Context<'a, S> {
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: This requires the wrapped subscriber to implement the
/// <a href="../registry/trait.LookupSpan.html"><code>LookupSpan</code></a> trait.
/// <code>Layer</code> implementations that wish to use this
/// function can bound their <code>Subscriber</code> type parameter with:
/// </pre>
/// </pre></div>
/// ```rust,ignore
/// where S: Subscriber + for<'a> LookupSpan<'a>,`
/// ```
Expand All @@ -933,13 +929,12 @@ impl<'a, S: Subscriber> Context<'a, S> {
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: This requires the wrapped subscriber to implement the
/// <a href="../registry/trait.LookupSpan.html"><code>LookupSpan</code></a> trait.
/// <code>Layer</code> implementations that wish to use this
/// function can bound their <code>Subscriber</code> type parameter with:
/// </pre>
/// </pre></div>
/// ```rust,ignore
/// where S: Subscriber + for<'a> LookupSpan<'a>,`
/// ```
Expand All @@ -964,13 +959,12 @@ impl<'a, S: Subscriber> Context<'a, S> {
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: This requires the wrapped subscriber to implement the
/// <a href="../registry/trait.LookupSpan.html"><code>LookupSpan</code></a> trait.
/// <code>Layer</code> implementations that wish to use this
/// function can bound their <code>Subscriber</code> type parameter with:
/// </pre>
/// </pre></div>
/// ```rust,ignore
/// where S: Subscriber + for<'a> LookupSpan<'a>,`
/// ```
Expand Down Expand Up @@ -1006,13 +1000,12 @@ impl<'a, S: Subscriber> Context<'a, S> {
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: This requires the wrapped subscriber to implement the
/// <a href="../registry/trait.LookupSpan.html"><code>LookupSpan</code></a> trait.
/// <code>Layer</code> implementations that wish to use this
/// function can bound their <code>Subscriber</code> type parameter with:
/// </pre>
/// </pre></div>
/// ```rust,ignore
/// where S: Subscriber + for<'a> LookupSpan<'a>,`
/// ```
Expand Down
3 changes: 1 addition & 2 deletions tracing-subscriber/src/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,13 @@ pub trait LookupSpan<'a> {
/// <div class="tooltip ignore" style="">ⓘ<span class="tooltiptext">Note</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block">
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: users of the <code>LookupSpan<code> trait should
/// typically call the <a href="#method.span"><code>span</code> method rather
/// than this method. The <code>span</code> method is implemented by
/// <em>calling</em> <code>span_data</code>, but returns a reference which is
/// capable of performing more sophisiticated queries.
/// </pre>
/// </pre></div>
///
/// [`SpanData`]: trait.SpanData.html
fn span_data(&'a self, id: &Id) -> Option<Self::Data>;
Expand Down

0 comments on commit c4a6a6d

Please sign in to comment.