Add doc attributes for docs.rs build (#105)

* add with_capacity method.

* Improve docs.

* .

* name the correct requirements.
This commit is contained in:
Lokathor
2020-08-09 10:30:17 -06:00
committed by GitHub
parent 3ff291c63b
commit 1196d2ae7c
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -43,6 +43,7 @@ experimental_write_impl = []
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg","docs_rs"]
[profile.test]
opt-level = 3
+2
View File
@@ -26,6 +26,7 @@ use alloc::vec::{self, Vec};
/// let many_ints: TinyVec<[i32; 4]> = tiny_vec!(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
/// ```
#[macro_export]
#[cfg_attr(docs_rs, doc(cfg(feature = "alloc")))]
macro_rules! tiny_vec {
($array_type:ty => $($elem:expr),* $(,)?) => {
{
@@ -82,6 +83,7 @@ pub enum TinyVecConstructor<A: Array> {
/// let some_ints = tiny_vec!([i32; 4] => 1, 2, 3);
/// ```
#[derive(Clone)]
#[cfg_attr(docs_rs, doc(cfg(feature = "alloc")))]
pub enum TinyVec<A: Array> {
#[allow(missing_docs)]
Inline(ArrayVec<A>),