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 f7862d0 commit 1363353Copy full SHA for 1363353
1 file changed
uefi/src/data_types/owned_strs.rs
@@ -101,13 +101,13 @@ impl CString16 {
101
102
/// Returns the number of characters without the trailing null character.
103
#[must_use]
104
- pub fn num_chars(&self) -> usize {
+ pub const fn num_chars(&self) -> usize {
105
self.0.len() - 1
106
}
107
108
/// Returns if the string is empty. This ignores the null character.
109
110
- pub fn is_empty(&self) -> bool {
+ pub const fn is_empty(&self) -> bool {
111
self.num_chars() == 0
112
113
0 commit comments