File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-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 @@ -22,11 +22,13 @@ macro_rules! types {
2222 /// Returns Management Information Base (MIB)
2323 ///
2424 /// This value can be used to access the key without doing string lookup.
25+ #[ must_use]
2526 pub fn mib( ) -> :: error:: Result <[ <$id _mib>] > {
2627 Ok ( [ <$id _mib>] ( Self :: NAME . $name_to_mib( ) ?) )
2728 }
2829
2930 /// Key [`::keys::Name`].
31+ #[ must_use]
3032 pub fn name( ) -> & ' static :: keys:: Name {
3133 Self :: NAME
3234 }
You can’t perform that action at this time.
0 commit comments