From 5dbe09c0b4b24d7d413b194742e0981aade07694 Mon Sep 17 00:00:00 2001 From: novacrazy Date: Tue, 12 Sep 2023 19:22:56 -0500 Subject: [PATCH] Second attempt, and improve doc links --- .github/workflows/CI.yml | 5 ++--- README.md | 4 ++-- src/lib.rs | 8 +++++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 88f57c235..cf832b858 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,6 +4,7 @@ on: [push, pull_request] env: CARGO_TERM_COLOR: always + RUSTDOCFLAGS: "--cfg docsrs" jobs: build_test: @@ -37,9 +38,7 @@ jobs: uses: dtolnay/rust-toolchain@nightly - name: Build documentation - run: | - echo "RUSTDOCFLAGS='--cfg docsrs'" >> $GITHUB_ENV - cargo doc --features "serde zeroize const-default alloc" + run: cargo doc --features "serde zeroize const-default alloc" - name: Finalize documentation run: | diff --git a/README.md b/README.md index 2dab5530c..b9c319bf1 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ [![Build Status](https://github.com/fizyk20/generic-array/actions/workflows/CI.yml/badge.svg)](https://github.com/fizyk20/generic-array/actions/workflows/CI.yml) # generic-array -This crate implements generic array types for Rust. +This crate implements a structure that can be used as a generic array type. **Requires minumum Rust version of 1.65.0 -[Documentation](http://fizyk20.github.io/generic-array/generic_array/) +[Documentation on GH Pages](https://fizyk20.github.io/generic-array/generic_array/) may be required to view certain types on foreign crates. ## Usage diff --git a/src/lib.rs b/src/lib.rs index f1109ed3e..66894c2b7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,12 @@ //! This crate implements a structure that can be used as a generic array type. //! -//! Before Rust 1.51, arrays `[T; N]` were problematic in that they couldn't be generic with respect to the length `N`, so this wouldn't work: +//! **Requires minumum Rust version of 1.65.0 +//! +//! [Documentation on GH Pages](https://fizyk20.github.io/generic-array/generic_array/) +//! may be required to view certain types on foreign crates. +//! +//! Before Rust 1.51, arrays `[T; N]` were problematic in that they couldn't be +//! generic with respect to the length `N`, so this wouldn't work: //! //! ```rust{compile_fail} //! struct Foo {