File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 40
40
//!
41
41
//! ## Examples
42
42
//!
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
45
45
//! 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.
47
47
//! We don't know the concrete type of our value at compile time, so we need to
48
48
//! use runtime reflection instead.
49
49
//!
50
50
//! ```rust
51
51
//! use std::fmt::Debug;
52
52
//! use std::any::Any;
53
53
//!
54
- //! // Logger function for any type that implements Debug.
54
+ //! // Logger function for any type that implements ` Debug` .
55
55
//! fn log<T: Any + Debug>(value: &T) {
56
56
//! let value_any = value as &dyn Any;
57
57
//!
You can’t perform that action at this time.
0 commit comments