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 675a188 commit 979fdf3Copy full SHA for 979fdf3
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