Skip to content

Commit 0aaa10d

Browse files
committed
Fix some typos
1 parent d5ba2cf commit 0aaa10d

File tree

11 files changed

+49
-17
lines changed

11 files changed

+49
-17
lines changed

.idea/.gitignore

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/log.iml

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
## [0.4.18] - 2023-05-28
6666

67-
* fix markdown links (again) by @hellow554 in https://github.com/rust-lang/log/pull/513
67+
* fix Markdown links (again) by @hellow554 in https://github.com/rust-lang/log/pull/513
6868
* add cargo doc to workflow by @hellow554 in https://github.com/rust-lang/log/pull/515
6969
* Apply Clippy lints by @hellow554 in https://github.com/rust-lang/log/pull/516
7070
* Replace ad-hoc eq_ignore_ascii_case with slice::eq_ignore_ascii_case by @glandium in https://github.com/rust-lang/log/pull/519
@@ -99,7 +99,7 @@
9999
* Improvements to test coverage.
100100
* Improvements to documentation.
101101
* Add key-value support to the `log!` macros.
102-
* Tighten `kv_unstable` internal dependencies so they don't bump past their current alpha.
102+
* Tighten `kv_unstable` internal dependencies, so they don't bump past their current alpha.
103103
* Add a simple visit API to `kv_unstable`.
104104
* Support `NonZero*` integers as values in structured logging
105105
* Support static strings as keys in structured logging
@@ -149,7 +149,7 @@ as either a map of `{key: value, ..}` or as a list of `[(key, value), ..]`.
149149

150150
### Fixed
151151

152-
* Fixed the `log!` macros so they work in expression context (this regressed in `0.4.9`, which has been yanked).
152+
* Fixed the `log!` macros, so they work in expression context (this regressed in `0.4.9`, which has been yanked).
153153

154154
## [0.4.9] - 2019-12-12 (yanked)
155155

@@ -260,7 +260,7 @@ version using log 0.4.x to avoid losing module and file information.
260260
* The `logger` free function returns a reference to the logger implementation. This, along with the
261261
ability to construct `Record`s, makes it possible to bridge from another logging framework to
262262
this one without digging into the private internals of the crate. The standard `error!` `warn!`,
263-
etc, macros now exclusively use the public API of the crate rather than "secret" internal APIs.
263+
etc., macros now exclusively use the public API of the crate rather than "secret" internal APIs.
264264
* `Log::flush` has been added to allow crates to tell the logging implementation to ensure that all
265265
"in flight" log events have been persisted. This can be used, for example, just before an
266266
application exits to ensure that asynchronous log sinks finish their work.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ sval = { version = "2.1" }
7272
sval_derive = { version = "2.1" }
7373
value-bag = { version = "1.7", features = ["test"] }
7474

75-
# NOTE: log doesn't actually depent on this crate. However our dependencies,
75+
# NOTE: log doesn't actually depent on this crate. However, our dependencies,
7676
# serde and sval, dependent on version 1.0 of the crate, which has problem fixed
7777
# in 1.0.60, specifically in the following commit
7878
# https://github.com/dtolnay/proc-macro2/commit/e31d61910049e097afdd3d27c37786309082bdcb.
79-
# By defining the crate as direct dependency we can increase it's minimal
79+
# By defining the crate as direct dependency we can increase its minimal
8080
# version making the minimal (crate) version CI happy.
8181
proc-macro2 = { version = "1.0.63", default-features = false }

rfcs/0296-structured-logging.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1633,7 +1633,7 @@ Structured logging is a paradigm that's supported by logging frameworks in many
16331633

16341634
## Rust
16351635

1636-
The `slog` library is a structured logging framework for Rust. Its API predates a stable `serde` crate so it defines its own traits that are similar to `serde::Serialize`. A log record consists of a rendered message and bag of structured key-value pairs. `slog` goes further than this RFC proposes by requiring callers of its `log!` macros to state whether key-values are owned or borrowed by the record, and whether the data is safe to share across threads.
1636+
The `slog` library is a structured logging framework for Rust. Its API predates a stable `serde` crate, so it defines its own traits that are similar to `serde::Serialize`. A log record consists of a rendered message and bag of structured key-value pairs. `slog` goes further than this RFC proposes by requiring callers of its `log!` macros to state whether key-values are owned or borrowed by the record, and whether the data is safe to share across threads.
16371637

16381638
This RFC proposes an API that's inspired by `slog`, but doesn't directly support distinguishing between owned or borrowed key-value pairs. Everything is borrowed. That means the only way to send a `Record` to another thread is to serialize it into a different type.
16391639

src/kv/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//! info!(a = 1; "Something of interest");
3030
//! ```
3131
//!
32-
//! Key-values support the same shorthand identifer syntax as `format_args`:
32+
//! Key-values support the same shorthand identifier syntax as `format_args`:
3333
//!
3434
//! ```
3535
//! # use log::info;

src/kv/value.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<'v> ToValue for Value<'v> {
101101
/// Values provide a number of ways to be serialized.
102102
///
103103
/// For basic types the [`Value::visit`] method can be used to extract the
104-
/// underlying typed value. However this is limited in the amount of types
104+
/// underlying typed value. However, this is limited in the amount of types
105105
/// supported (see the [`VisitValue`] trait methods).
106106
///
107107
/// For more complex types one of the following traits can be used:
@@ -373,13 +373,13 @@ impl_value_to_primitive![
373373
];
374374

375375
impl<'v> Value<'v> {
376-
/// Try convert this value into an error.
376+
/// Try to convert this value into an error.
377377
#[cfg(feature = "kv_std")]
378378
pub fn to_borrowed_error(&self) -> Option<&(dyn std::error::Error + 'static)> {
379379
self.inner.to_borrowed_error()
380380
}
381381

382-
/// Try convert this value into a borrowed string.
382+
/// Try to convert this value into a borrowed string.
383383
pub fn to_borrowed_str(&self) -> Option<&str> {
384384
self.inner.to_borrowed_str()
385385
}
@@ -433,7 +433,7 @@ mod std_support {
433433
}
434434

435435
impl<'v> Value<'v> {
436-
/// Try convert this value into a string.
436+
/// Try to convert this value into a string.
437437
pub fn to_cow_str(&self) -> Option<Cow<'v, str>> {
438438
self.inner.to_str()
439439
}
@@ -725,7 +725,7 @@ pub(in crate::kv) mod inner {
725725
726726
1. Conversions should always produce the same results. If a conversion here returns `Some`, then
727727
the same `value_bag`-based conversion must also. Of particular note here are floats to ints; they're
728-
based on the standard library's `TryInto` conversions, which need to be convert to `i32` or `u32`,
728+
based on the standard library's `TryInto` conversions, which need to be converted to `i32` or `u32`,
729729
and then to `f64`.
730730
2. VisitValues should always be called in the same way. If a particular type of value calls `visit_i64`,
731731
then the same `value_bag`-based visitor must also.

src/serde.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{Level, LevelFilter, LOG_LEVEL_NAMES};
1111
use std::fmt;
1212
use std::str::{self, FromStr};
1313

14-
// The Deserialize impls are handwritten to be case insensitive using FromStr.
14+
// The Deserialize impls are handwritten to be case-insensitive using FromStr.
1515

1616
impl Serialize for Level {
1717
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
@@ -57,7 +57,7 @@ impl<'de> Deserialize<'de> for Level {
5757
where
5858
E: Error,
5959
{
60-
// Case insensitive.
60+
// Case-insensitive.
6161
FromStr::from_str(s).map_err(|_| Error::unknown_variant(s, &LOG_LEVEL_NAMES[1..]))
6262
}
6363

@@ -152,7 +152,7 @@ impl<'de> Deserialize<'de> for LevelFilter {
152152
where
153153
E: Error,
154154
{
155-
// Case insensitive.
155+
// Case-insensitive.
156156
FromStr::from_str(s).map_err(|_| Error::unknown_variant(s, &LOG_LEVEL_NAMES))
157157
}
158158

tests/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This crate is intentionally left empty.
22
//!
3-
//! We have an empty library depending on `log` here so we can run integration tests
3+
//! We have an empty library depending on `log` here, so we can run integration tests
44
//! on older compilers without depending on the unstable `no-dev-deps` flag.
55
66
#![allow(dead_code)]

0 commit comments

Comments
 (0)