File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ impl Name {
8888
8989 /// Returns `true` if `self` is a key in the _MALLCTL NAMESPCE_ referring to
9090 /// a null-terminated string.
91+ #[ must_use]
9192 pub fn value_type_str ( & self ) -> bool {
9293 // remove the null-terminator:
9394 let name = self . 0 . split_at ( self . 0 . len ( ) - 1 ) . 0 ;
@@ -117,6 +118,7 @@ impl Name {
117118 }
118119
119120 /// Returns the name as null-terminated byte-string.
121+ #[ must_use]
120122 pub fn as_bytes ( & self ) -> & ' static [ u8 ] {
121123 unsafe { & * ( self as * const Self as * const [ u8 ] ) }
122124 }
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ macro_rules! types {
2727 }
2828
2929 /// Key [`::keys::Name`].
30+ #[ must_use]
3031 pub fn name( ) -> & ' static :: keys:: Name {
3132 Self :: NAME
3233 }
You can’t perform that action at this time.
0 commit comments