Skip to content

Commit aa51104

Browse files
committed
docs: remove usage of 0.2 terminology (#2728)
1 parent f875c16 commit aa51104

File tree

8 files changed

+36
-36
lines changed

8 files changed

+36
-36
lines changed

examples/examples/fmt-compact.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn main() {
77
.compact()
88
// enable everything
99
.with_max_level(tracing::Level::TRACE)
10-
// sets this to be the default, global collector for this application.
10+
// sets this to be the default, global subscriber for this application.
1111
.init();
1212

1313
let number_of_yaks = 3;

examples/examples/fmt-source-locations.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() {
1414
.with_line_number(true)
1515
// disable targets
1616
.with_target(false)
17-
// sets this to be the default, global collector for this application.
17+
// sets this to be the default, global subscriber for this application.
1818
.init();
1919

2020
let number_of_yaks = 3;

tracing-core/src/dispatcher.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,8 @@ impl Dispatch {
518518
}
519519
}
520520

521-
/// Registers a new callsite with this collector, returning whether or not
522-
/// the collector is interested in being notified about the callsite.
521+
/// Registers a new callsite with this subscriber, returning whether or not
522+
/// the subscriber is interested in being notified about the callsite.
523523
///
524524
/// This calls the [`register_callsite`] function on the [`Subscriber`]
525525
/// that this `Dispatch` forwards to.

tracing-subscriber/src/filter/env/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ impl Builder {
212212
#[cfg(feature = "nu_ansi_term")]
213213
use nu_ansi_term::{Color, Style};
214214
// NOTE: We can't use a configured `MakeWriter` because the EnvFilter
215-
// has no knowledge of any underlying subscriber or collector, which
215+
// has no knowledge of any underlying subscriber or subscriber, which
216216
// may or may not use a `MakeWriter`.
217217
let warn = |msg: &str| {
218218
#[cfg(not(feature = "nu_ansi_term"))]

tracing-subscriber/src/filter/layer_filters/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ impl<L, F, S> Filtered<L, F, S> {
694694
/// # }
695695
/// ```
696696
///
697-
/// [subscriber]: Subscribe
697+
/// [`Layer`]: crate::layer::Layer
698698
pub fn inner_mut(&mut self) -> &mut L {
699699
&mut self.layer
700700
}
@@ -706,8 +706,8 @@ where
706706
F: layer::Filter<S> + 'static,
707707
L: Layer<S>,
708708
{
709-
fn on_register_dispatch(&self, collector: &Dispatch) {
710-
self.layer.on_register_dispatch(collector);
709+
fn on_register_dispatch(&self, subscriber: &Dispatch) {
710+
self.layer.on_register_dispatch(subscriber);
711711
}
712712

713713
fn on_layer(&mut self, subscriber: &mut S) {
@@ -1190,7 +1190,7 @@ impl FilterState {
11901190
}
11911191
}
11921192

1193-
/// Run a second filtering pass, e.g. for Subscribe::event_enabled.
1193+
/// Run a second filtering pass, e.g. for Layer::event_enabled.
11941194
fn and(&self, filter: FilterId, f: impl FnOnce() -> bool) -> bool {
11951195
let map = self.enabled.get();
11961196
let enabled = map.is_enabled(filter) && f();

tracing-subscriber/src/fmt/time/time_crate.rs

+24-24
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ impl LocalTime<well_known::Rfc3339> {
7676
/// ```
7777
/// use tracing_subscriber::fmt::{self, time};
7878
///
79-
/// let collector = tracing_subscriber::fmt()
79+
/// let subscriber = tracing_subscriber::fmt()
8080
/// .with_timer(time::LocalTime::rfc_3339());
81-
/// # drop(collector);
81+
/// # drop(subscriber);
8282
/// ```
8383
///
8484
/// [local time]: time::OffsetDateTime::now_local
@@ -130,9 +130,9 @@ impl<F: Formattable> LocalTime<F> {
130130
/// use time::macros::format_description;
131131
///
132132
/// let timer = LocalTime::new(format_description!("[hour]:[minute]:[second]"));
133-
/// let collector = tracing_subscriber::fmt()
133+
/// let subscriber = tracing_subscriber::fmt()
134134
/// .with_timer(timer);
135-
/// # drop(collector);
135+
/// # drop(subscriber);
136136
/// ```
137137
///
138138
/// Using [`time::format_description::parse`]:
@@ -143,9 +143,9 @@ impl<F: Formattable> LocalTime<F> {
143143
/// let time_format = time::format_description::parse("[hour]:[minute]:[second]")
144144
/// .expect("format string should be valid!");
145145
/// let timer = LocalTime::new(time_format);
146-
/// let collector = tracing_subscriber::fmt()
146+
/// let subscriber = tracing_subscriber::fmt()
147147
/// .with_timer(timer);
148-
/// # drop(collector);
148+
/// # drop(subscriber);
149149
/// ```
150150
///
151151
/// Using the [`format_description!`] macro requires enabling the `time`
@@ -158,9 +158,9 @@ impl<F: Formattable> LocalTime<F> {
158158
/// use tracing_subscriber::fmt::{self, time::LocalTime};
159159
///
160160
/// let timer = LocalTime::new(time::format_description::well_known::Rfc3339);
161-
/// let collector = tracing_subscriber::fmt()
161+
/// let subscriber = tracing_subscriber::fmt()
162162
/// .with_timer(timer);
163-
/// # drop(collector);
163+
/// # drop(subscriber);
164164
/// ```
165165
///
166166
/// [local time]: time::OffsetDateTime::now_local()
@@ -207,9 +207,9 @@ impl UtcTime<well_known::Rfc3339> {
207207
/// ```
208208
/// use tracing_subscriber::fmt::{self, time};
209209
///
210-
/// let collector = tracing_subscriber::fmt()
210+
/// let subscriber = tracing_subscriber::fmt()
211211
/// .with_timer(time::UtcTime::rfc_3339());
212-
/// # drop(collector);
212+
/// # drop(subscriber);
213213
/// ```
214214
///
215215
/// [local time]: time::OffsetDateTime::now_utc
@@ -247,9 +247,9 @@ impl<F: Formattable> UtcTime<F> {
247247
/// use time::macros::format_description;
248248
///
249249
/// let timer = UtcTime::new(format_description!("[hour]:[minute]:[second]"));
250-
/// let collector = tracing_subscriber::fmt()
250+
/// let subscriber = tracing_subscriber::fmt()
251251
/// .with_timer(timer);
252-
/// # drop(collector);
252+
/// # drop(subscriber);
253253
/// ```
254254
///
255255
/// Using the [`format_description!`] macro requires enabling the `time`
@@ -263,9 +263,9 @@ impl<F: Formattable> UtcTime<F> {
263263
/// let time_format = time::format_description::parse("[hour]:[minute]:[second]")
264264
/// .expect("format string should be valid!");
265265
/// let timer = UtcTime::new(time_format);
266-
/// let collector = tracing_subscriber::fmt()
266+
/// let subscriber = tracing_subscriber::fmt()
267267
/// .with_timer(timer);
268-
/// # drop(collector);
268+
/// # drop(subscriber);
269269
/// ```
270270
///
271271
/// Using a [well-known format][well-known formats] (this is equivalent to
@@ -275,9 +275,9 @@ impl<F: Formattable> UtcTime<F> {
275275
/// use tracing_subscriber::fmt::{self, time::UtcTime};
276276
///
277277
/// let timer = UtcTime::new(time::format_description::well_known::Rfc3339);
278-
/// let collector = tracing_subscriber::fmt()
278+
/// let subscriber = tracing_subscriber::fmt()
279279
/// .with_timer(timer);
280-
/// # drop(collector);
280+
/// # drop(subscriber);
281281
/// ```
282282
///
283283
/// [UTC time]: time::OffsetDateTime::now_utc()
@@ -326,9 +326,9 @@ impl OffsetTime<well_known::Rfc3339> {
326326
/// ```
327327
/// use tracing_subscriber::fmt::{self, time};
328328
///
329-
/// let collector = tracing_subscriber::fmt()
329+
/// let subscriber = tracing_subscriber::fmt()
330330
/// .with_timer(time::OffsetTime::local_rfc_3339().expect("could not get local offset!"));
331-
/// # drop(collector);
331+
/// # drop(subscriber);
332332
/// ```
333333
///
334334
/// Using `OffsetTime` with Tokio:
@@ -398,9 +398,9 @@ impl<F: time::formatting::Formattable> OffsetTime<F> {
398398
///
399399
/// let offset = UtcOffset::current_local_offset().expect("should get local offset!");
400400
/// let timer = OffsetTime::new(offset, format_description!("[hour]:[minute]:[second]"));
401-
/// let collector = tracing_subscriber::fmt()
401+
/// let subscriber = tracing_subscriber::fmt()
402402
/// .with_timer(timer);
403-
/// # drop(collector);
403+
/// # drop(subscriber);
404404
/// ```
405405
///
406406
/// Using [`time::format_description::parse`]:
@@ -413,9 +413,9 @@ impl<F: time::formatting::Formattable> OffsetTime<F> {
413413
/// let time_format = time::format_description::parse("[hour]:[minute]:[second]")
414414
/// .expect("format string should be valid!");
415415
/// let timer = OffsetTime::new(offset, time_format);
416-
/// let collector = tracing_subscriber::fmt()
416+
/// let subscriber = tracing_subscriber::fmt()
417417
/// .with_timer(timer);
418-
/// # drop(collector);
418+
/// # drop(subscriber);
419419
/// ```
420420
///
421421
/// Using the [`format_description!`] macro requires enabling the `time`
@@ -430,9 +430,9 @@ impl<F: time::formatting::Formattable> OffsetTime<F> {
430430
///
431431
/// let offset = UtcOffset::current_local_offset().expect("should get local offset!");
432432
/// let timer = OffsetTime::new(offset, time::format_description::well_known::Rfc3339);
433-
/// let collector = tracing_subscriber::fmt()
433+
/// let subscriber = tracing_subscriber::fmt()
434434
/// .with_timer(timer);
435-
/// # drop(collector);
435+
/// # drop(subscriber);
436436
/// ```
437437
///
438438
/// [`time` crate]: time

tracing-subscriber/src/layer/layered.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ where
470470
return Interest::sometimes();
471471
}
472472

473-
// otherwise, allow the inner subscriber or collector to weigh in.
473+
// otherwise, allow the inner subscriber or subscriber to weigh in.
474474
inner
475475
}
476476

tracing-subscriber/src/layer/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,8 @@ where
750750
/// [`WeakDispatch`]: tracing_core::dispatcher::WeakDispatch
751751
/// [upgraded]: tracing_core::dispatcher::WeakDispatch::upgrade
752752
/// [`Subscriber`]: tracing_core::Subscriber
753-
fn on_register_dispatch(&self, collector: &Dispatch) {
754-
let _ = collector;
753+
fn on_register_dispatch(&self, subscriber: &Dispatch) {
754+
let _ = subscriber;
755755
}
756756

757757
/// Performs late initialization when attaching a `Layer` to a

0 commit comments

Comments
 (0)