You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have several lazy statics that use .unwrap(), thus they can panic. This is poor API design and should be fixed. See #136 for an example of this.
lazy_static!{/// The number of clock ticks per second.
///
/// This is calculated from `sysconf(_SC_CLK_TCK)`.static ref TICKS_PER_SECOND: i64 = {
ticks_per_second().unwrap()};
/// The version of the currently running kernel.
///
/// This is a lazily constructed static. You can also get this information via/// [KernelVersion::new()].static ref KERNEL: KernelVersion = {KernelVersion::current().unwrap()};
/// Memory page size, in bytes.
///
/// This is calculated from `sysconf(_SC_PAGESIZE)`.static ref PAGESIZE: i64 = {
page_size().unwrap()};
}
The text was updated successfully, but these errors were encountered:
We have several lazy statics that use
.unwrap()
, thus they can panic. This is poor API design and should be fixed. See #136 for an example of this.The text was updated successfully, but these errors were encountered: