From 1e0cb53acecf3961247c0f7bfde46a9085164104 Mon Sep 17 00:00:00 2001 From: daxpedda Date: Tue, 16 Mar 2021 17:42:03 +0100 Subject: [PATCH] Document always returning at least 1 core --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 6c8280f..940fb3f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -47,6 +47,8 @@ use linux::{get_num_cpus, get_num_physical_cpus}; /// This function will get the number of logical cores. Sometimes this is different from the number /// of physical cores (See [Simultaneous multithreading on Wikipedia][smt]). /// +/// This will always return at least `1`. +/// /// # Examples /// /// ``` @@ -75,6 +77,8 @@ pub fn get() -> usize { /// Returns the number of physical cores of the current system. /// +/// This will always return at least `1`. +/// /// # Note /// /// Physical count is supported only on Linux, mac OS and Windows platforms.