51
51
//! negative numbers counted in other number bases.
52
52
//! </div>
53
53
//!
54
- //! Since negative, base-10 numbers are represented with a negative sign,
55
- //! the digit count of a positive, base-10 number will be equal to the count
56
- //! of its negated value.
54
+ //! Since negative numbers represented in base-10 are displayed with a negative sign,
55
+ //! the base-10 digit count of a positive number will be equal to the base-10 digit count
56
+ //! of the number's negated value.
57
57
//!
58
58
//! ```rust
59
59
//! # use count_digits::CountDigits;
64
64
//! ````
65
65
//!
66
66
//! However, the digit counts of negative numbers represented in other bases reflect the
67
- //! [twos-complement representation ](https://en.wikipedia.org/wiki/Two%27s_complement),
67
+ //! [twos-complement](https://en.wikipedia.org/wiki/Two%27s_complement) representation ,
68
68
//! and the digit count of a positive number will _not_ be the same as the count
69
69
//! of its negated value.
70
70
//!
97
97
//! }
98
98
//! ````
99
99
//!
100
- //! These counts are consistent with the representations of Rust's display format.
100
+ //! This behavior is consistent with Rust's display format.
101
101
//! ```rust
102
102
//! # use count_digits::CountDigits;
103
103
//! assert_eq!(1, format!("{:b}", 1_i8).chars().count());
@@ -119,7 +119,7 @@ use core::num::{NonZeroU128, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8, NonZ
119
119
pub trait CountDigits : Copy + Sized {
120
120
/// The type of integer that should be passed in to the
121
121
/// [count_digits_radix()](CountDigits::count_digits_radix) function.
122
- ///
122
+ ///
123
123
/// This is equal to [Self](CountDigits) for primitive types,
124
124
/// and is equal to the corresponding primitive type for non-zero types.
125
125
type Radix ;
0 commit comments