We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90abe2d commit 7f4e47cCopy full SHA for 7f4e47c
src/ascii_str.rs
@@ -139,7 +139,7 @@ impl AsciiStr {
139
/// ```
140
#[inline]
141
#[must_use]
142
- pub fn len(&self) -> usize {
+ pub const fn len(&self) -> usize {
143
self.slice.len()
144
}
145
@@ -155,7 +155,7 @@ impl AsciiStr {
155
156
157
158
- pub fn is_empty(&self) -> bool {
+ pub const fn is_empty(&self) -> bool {
159
self.len() == 0
160
161
0 commit comments