Skip to content
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

chore: Fix spelling #2854

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/examples/fmt/yak_shave.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use tracing::{debug, error, info, span, trace, warn, Level};

// the `#[tracing::instrument]` attribute creates and enters a span
// every time the instrumented function is called. The span is named after
// the function or method. Paramaters passed to the function are recorded as fields.
// the function or method. Parameters passed to the function are recorded as fields.
#[tracing::instrument]
pub fn shave(yak: usize) -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
// this creates an event at the TRACE log level with two fields:
Expand Down
2 changes: 1 addition & 1 deletion tracing-core/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ impl Kind {
pub const SPAN: Kind = Kind(Self::SPAN_BIT);

/// `enabled!` callsite. [`Collect`][`crate::collect::Collect`]s can assume
/// this `Kind` means they will never recieve a
/// this `Kind` means they will never receive a
/// full event with this [`Metadata`].
pub const HINT: Kind = Kind(Self::HINT_BIT);

Expand Down
2 changes: 1 addition & 1 deletion tracing-error/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- **TracedError**: `TracedError`, an error type wrapper that annotates an error
with the current span.
- **SpanTrace**:`SpanTrace::status` method and `SpanTraceStatus` type for
determing whether a `SpanTrace` was successfully captured (#614)
determining whether a `SpanTrace` was successfully captured (#614)

### Changed

Expand Down
2 changes: 1 addition & 1 deletion tracing-error/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ where
// erased `ErrorImpl` back to its original type, which is needed in order to forward our
// error/display/debug impls to the internal error type from the type erased error type.
//
// The repr(C) is necessary to ensure that the struct is layed out in the order we
// The repr(C) is necessary to ensure that the struct is laid out in the order we
// specified it, so that we can safely access the vtable and spantrace fields through a type
// erased pointer to the original object.
let vtable = &ErrorVTable {
Expand Down
2 changes: 1 addition & 1 deletion tracing-mock/src/subscriber.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! An implementation of the [`Subscribe`] trait which validates that
//! the `tracing` data it recieves matches the expected output for a test.
//! the `tracing` data it receives matches the expected output for a test.
//!
//!
//! The [`MockSubscriber`] is the central component in these tools. The
Expand Down
12 changes: 6 additions & 6 deletions tracing-subscriber/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Thanks to @bdonlan and @jeromegn for contributing to this release!
### Changed

- **filter**: `LevelFilter` is now a re-export of the
`tracing_core::LevelFilter` type, it can now be used interchangably with the
`tracing_core::LevelFilter` type, it can now be used interchangeably with the
versions in `tracing` and `tracing-core` (#853)
- **filter**: Significant performance improvements when comparing `LevelFilter`s
and `Level`s (#853)
Expand Down Expand Up @@ -260,7 +260,7 @@ tuning in this release!

- **fmt**: Fixed empty `{}` printed after spans with no fields (f079f2d)
- **fmt**: Fixed inconsistent formatting when ANSI colors are disabled (506a482)
- **fmt**: Fixed mis-aligned levels when ANSI colors are disabled (eba1adb)
- **fmt**: Fixed misaligned levels when ANSI colors are disabled (eba1adb)
- Fixed warnings on nightly Rust compilers (#558)

# 0.2.0-alpha.5 (January 31, 2020)
Expand Down Expand Up @@ -347,9 +347,9 @@ tuning in this release!
changes in subsequent alpha. (#420, #425)
- **BREAKING**: Removed `Filter`. Use `EnvFilter` instead (#434)

### Contributers
### Contributors

Thanks to all the contributers to this release!
Thanks to all the contributors to this release!

- @pimeys for #377 and #415

Expand All @@ -375,9 +375,9 @@ Thanks to all the contributers to this release!
order to initialize the global logger. Only `tracing-log` needs to be
specified now (#400).

### Contributers
### Contributors

Thanks to all the contributers to this release!
Thanks to all the contributors to this release!

- @emschwartz for #385, #387, #400 and #401
- @bIgBV for #388
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/src/filter/env/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ impl EnvFilter {
let level = metadata.level();

// is it possible for a dynamic filter directive to enable this event?
// if not, we can avoid the thread loca'l access + iterating over the
// if not, we can avoid the thread local access + iterating over the
// spans in the current scope.
if self.has_dynamics && self.dynamics.max_level >= *level {
if metadata.is_span() {
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/src/filter/filter_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ where
metadata: &'static Metadata<'static>,
) -> Interest {
// Because `self.enabled` takes a `Metadata` only (and no `Context`
// parameter), we can reasonably assume its results are cachable, and
// parameter), we can reasonably assume its results are cacheable, and
// just return `Interest::always`/`Interest::never`.
if (self.enabled)(metadata) {
debug_assert!(
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/src/filter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ feature! {
pub use self::directive::ParseError;
}

/// Stub implementations of the per-subscriber-fitler detection functions for
/// Stub implementations of the per-subscriber-filter detection functions for
/// when the `registry` feature is disabled.
#[cfg(not(all(feature = "registry", feature = "std")))]
mod has_psf_stubs {
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/src/filter/subscriber_filters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ where
//
// it would be cool if there was some wild rust reflection way of checking
// if a trait impl has the default impl of a trait method or not, but that's
// almsot certainly impossible...right?
// almost certainly impossible...right?

fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest {
let interest = self.filter.callsite_enabled(metadata);
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/src/fmt/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,7 @@ pub(super) mod test {
"^fake time tracing_subscriber::fmt::format::test: {}:[0-9]+: hello\n$",
current_path()
// if we're on Windows, the path might contain backslashes, which
// have to be escpaed before compiling the regex.
// have to be escaped before compiling the regex.
.replace('\\', "\\\\")
))
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/src/fmt/time/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ mod tests {
case("1901-12-13T20:45:52.000000Z", i32::MIN as i64, 0);
case("1901-12-13T20:45:51.000000Z", i32::MIN as i64 - 1, 0);

// Skipping these tests on windows as std::time::SysteTime range is low
// Skipping these tests on windows as std::time::SystemTime range is low
// on Windows compared with that of Unix which can cause the following
// high date value tests to panic
#[cfg(not(target_os = "windows"))]
Expand Down
10 changes: 5 additions & 5 deletions tracing-subscriber/src/subscribe/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@
//! callsite). See [`Collect::register_callsite`] and
//! [`tracing_core::callsite`] for a summary of how this behaves.
//! - [`enabled`], once per emitted event (roughly: once per time that `event!`
//! or `span!` is *executed*), and only if `register_callsite` regesters an
//! or `span!` is *executed*), and only if `register_callsite` registers an
//! [`Interest::sometimes`]. This is the main customization point to globally
//! filter events based on their [`Metadata`]. If an event can be disabled
//! based only on [`Metadata`], it should be, as this allows the construction
Expand Down Expand Up @@ -768,7 +768,7 @@ where
/// [`Collect`] has been set as the default, both the subscriber and
/// [`Collect`] are passed to this method _mutably_. This gives the
/// subscribe the opportunity to set any of its own fields with values
/// recieved by method calls on the [`Collect`].
/// received by method calls on the [`Collect`].
///
/// For example, [`Filtered`] subscribers implement `on_subscribe` to call the
/// [`Collect`]'s [`register_filter`] method, and store the returned
Expand Down Expand Up @@ -900,7 +900,7 @@ where
///
/// **Note**: This method determines whether an event is globally enabled,
/// *not* whether the individual subscriber will be notified about the
/// event. This is intended to be used by subscibers that implement
/// event. This is intended to be used by subscribers that implement
/// filtering for the entire stack. Subscribers which do not wish to be
/// notified about certain events but do not wish to globally disable them
/// should ignore those events in their [on_event][Self::on_event].
Expand Down Expand Up @@ -1287,7 +1287,7 @@ pub trait Filter<S> {
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: If a <code>Filter</code> will perform
/// <em>dynamic filtering</em> that depends on the current context in which
/// a span or event was observered (e.g. only enabling an event when it
/// a span or event was observed (e.g. only enabling an event when it
/// occurs within a particular span), it <strong>must</strong> return
/// <code>Interest::sometimes()</code> from this method. If it returns
/// <code>Interest::always()</code> or <code>Interest::never()</code>, the
Expand All @@ -1306,7 +1306,7 @@ pub trait Filter<S> {
/// other hand, when a `Filter` returns [`Interest::always()`][always] or
/// [`Interest::never()`][never] for a callsite, _other_ [`Subscribe`]s may have
/// differing interests in that callsite. If this is the case, the callsite
/// will recieve [`Interest::sometimes()`][sometimes], and the [`enabled`]
/// will receive [`Interest::sometimes()`][sometimes], and the [`enabled`]
/// method will still be called for that callsite when it records a span or
/// event.
///
Expand Down
2 changes: 1 addition & 1 deletion tracing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ this release!
filtering, improving performance when a span or event is disabled by a
`static_max_level_XXX` feature flag (#868)
- `LevelFilter` is now a re-export of the `tracing_core::LevelFilter` type, it
can now be used interchangably with the versions in `tracing-core` and
can now be used interchangeably with the versions in `tracing-core` and
`tracing-subscriber` (#853)
- Significant performance improvements when comparing `LevelFilter`s and
`Level`s (#853)
Expand Down
4 changes: 2 additions & 2 deletions tracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ use tracing::{debug, error, info, span, warn, Level};

// the `#[tracing::instrument]` attribute creates and enters a span
// every time the instrumented function is called. The span is named after
// the function or method. Paramaters passed to the function are recorded as fields.
// the function or method. Parameters passed to the function are recorded as fields.
#[tracing::instrument]
pub fn shave(yak: usize) -> Result<(), Box<dyn Error + 'static>> {
// this creates an event at the DEBUG level with two fields:
Expand Down Expand Up @@ -186,7 +186,7 @@ pub fn shave_all(yaks: usize) -> usize {

if let Err(ref error) = res {
// Like spans, events can also use the field initialization shorthand.
// In this instance, `yak` is the field being initalized.
// In this instance, `yak` is the field being initialized.
error!(yak, error = error.as_ref(), "failed to shave yak!");
} else {
yaks_shaved += 1;
Expand Down
2 changes: 1 addition & 1 deletion tracing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
//! For functions which don't have built-in tracing support and can't have
//! the `#[instrument]` attribute applied (such as from an external crate),
//! the [`Span` struct][`Span`] has a [`in_scope()` method][`in_scope`]
//! which can be used to easily wrap synchonous code in a span.
//! which can be used to easily wrap synchronous code in a span.
//!
//! For example:
//! ```rust
Expand Down
2 changes: 1 addition & 1 deletion tracing/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3044,7 +3044,7 @@ macro_rules! fieldset {
$crate::fieldset!(@ { $($out),*, $k } $($rest)*)
};

// Remainder is unparseable, but exists --- must be format args!
// Remainder is unparsable, but exists --- must be format args!
(@ { $(,)* $($out:expr),* } $($rest:tt)+) => {
$crate::fieldset!(@ { "message", $($out),*, })
};
Expand Down
2 changes: 1 addition & 1 deletion tracing/tests/enabled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn span_and_event() {

let _guard = tracing::collect::set_default(collector);

// Ensure that the `_event` and `_span` alternatives work corretly
// Ensure that the `_event` and `_span` alternatives work correctly
assert!(!tracing::event_enabled!(Level::TRACE));
assert!(tracing::event_enabled!(Level::DEBUG));
assert!(tracing::span_enabled!(Level::TRACE));
Expand Down
Loading