Skip to content

Commit 7804ede

Browse files
authored
Improve wording in std::any explanation
Prefer 'log' over 'log out' to avoid confusion, and use backticks consistently.
1 parent 685927a commit 7804ede

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: library/core/src/any.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@
4040
//!
4141
//! ## Examples
4242
//!
43-
//! Consider a situation where we want to log out a value passed to a function.
44-
//! We know the value we're working on implements Debug, but we don't know its
43+
//! Consider a situation where we want to log a value passed to a function.
44+
//! We know the value we're working on implements `Debug`, but we don't know its
4545
//! concrete type. We want to give special treatment to certain types: in this
46-
//! case printing out the length of String values prior to their value.
46+
//! case printing out the length of `String` values prior to their value.
4747
//! We don't know the concrete type of our value at compile time, so we need to
4848
//! use runtime reflection instead.
4949
//!
5050
//! ```rust
5151
//! use std::fmt::Debug;
5252
//! use std::any::Any;
5353
//!
54-
//! // Logger function for any type that implements Debug.
54+
//! // Logger function for any type that implements `Debug`.
5555
//! fn log<T: Any + Debug>(value: &T) {
5656
//! let value_any = value as &dyn Any;
5757
//!

0 commit comments

Comments
 (0)