Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Commit d872fa6

Browse files
committed
Name a field to indicate it's only for keepalive
1 parent 3fb6b05 commit d872fa6

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
#![no_std]
2-
#![feature(
3-
allocator_api,
4-
const_fn,
5-
lang_items,
6-
alloc_error_handler
7-
)]
2+
#![feature(allocator_api, const_fn, lang_items, alloc_error_handler)]
83

94
#[macro_use]
105
extern crate alloc;

src/sysctl.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ impl SysctlStorage for atomic::AtomicBool {
5656

5757
pub struct Sysctl<T: SysctlStorage> {
5858
inner: Box<T>,
59-
table: Box<[bindings::ctl_table]>,
59+
// Responsible for keeping the ctl_table alive.
60+
_table: Box<[bindings::ctl_table]>,
6061
header: *mut bindings::ctl_table_header,
6162
}
6263

@@ -138,7 +139,7 @@ impl<T: SysctlStorage> Sysctl<T> {
138139

139140
return Ok(Sysctl {
140141
inner: storage,
141-
table: table,
142+
_table: table,
142143
header: result,
143144
});
144145
}

0 commit comments

Comments
 (0)