summaryrefslogtreecommitdiff
path: root/lazy-static/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-12-29 09:22:57 -0800
committerDaniel Mueller <deso@posteo.net>2019-12-29 09:22:57 -0800
commit4ae7f49555583b0d02fe73354e79243980545b60 (patch)
tree36ea299e8a2c41ba0e2bc24f7b08ef987d088091 /lazy-static/src/lib.rs
parent3602aa37413186da0973c069bd0edc701a240dfe (diff)
downloadnitrocli-4ae7f49555583b0d02fe73354e79243980545b60.tar.gz
nitrocli-4ae7f49555583b0d02fe73354e79243980545b60.tar.bz2
Update lazy_static crate to 1.4.0
This change updates the lazy_static crate version to 1.4.0. Import subrepo lazy-static/:lazy-static at 421669662b35fcb455f2902daed2e20bbbba79b6
Diffstat (limited to 'lazy-static/src/lib.rs')
-rw-r--r--lazy-static/src/lib.rs19
1 files changed, 11 insertions, 8 deletions
diff --git a/lazy-static/src/lib.rs b/lazy-static/src/lib.rs
index 42dc405..cada0dc 100644
--- a/lazy-static/src/lib.rs
+++ b/lazy-static/src/lib.rs
@@ -90,17 +90,13 @@ The `Deref` implementation uses a hidden static variable that is guarded by an a
# Cargo features
-This crate provides two cargo features:
+This crate provides one cargo feature:
-- `nightly`: This uses unstable language features only available on the nightly release channel for a more optimal implementation. In practice this currently means avoiding a heap allocation per static. This feature might get deprecated at a later point once all relevant optimizations are usable from stable.
-- `spin_no_std` (implies `nightly`): This allows using this crate in a no-std environment, by depending on the standalone `spin` crate.
-
-Both features depend on unstable language features, which means
-no guarantees can be made about them in regard to SemVer stability.
+- `spin_no_std`: This allows using this crate in a no-std environment, by depending on the standalone `spin` crate.
*/
-#![doc(html_root_url = "https://docs.rs/lazy_static/1.2.0")]
+#![doc(html_root_url = "https://docs.rs/lazy_static/1.4.0")]
#![no_std]
#[cfg(not(feature = "spin_no_std"))]
@@ -108,6 +104,13 @@ no guarantees can be made about them in regard to SemVer stability.
#[doc(hidden)]
pub mod lazy;
+#[cfg(test)]
+#[macro_use]
+extern crate doc_comment;
+
+#[cfg(test)]
+doctest!("../README.md");
+
#[cfg(feature = "spin_no_std")]
#[path="core_lazy.rs"]
#[doc(hidden)]
@@ -196,7 +199,7 @@ pub trait LazyStatic {
/// extern crate lazy_static;
///
/// lazy_static! {
-/// static ref BUFFER: Vec<u8> = (0..65537).collect();
+/// static ref BUFFER: Vec<u8> = (0..255).collect();
/// }
///
/// fn main() {