Skip to content

Commit

Permalink
Second attempt, and improve doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
novacrazy committed Sep 13, 2023
1 parent 403b4c4 commit 5dbe09c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/CI.yml
Expand Up @@ -4,6 +4,7 @@ on: [push, pull_request]

env:
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: "--cfg docsrs"

jobs:
build_test:
Expand Down Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -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

Expand Down
8 changes: 7 additions & 1 deletion 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<N> {
Expand Down

0 comments on commit 5dbe09c

Please sign in to comment.