Skip to content

Publish doc #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,20 @@ jobs:

doc:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo doc
- run: cargo doc --no-deps
- run: |
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=static_vector/index.html" /></head></html>' > target/doc/index.html
- uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
publish_branch: gh-pages
# if: github.ref == 'refs/heads/master'

clippy:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ bench:
xdg-open target/criterion/push\ and\ clear/report/index.html

doc:
cargo doc --open
cargo doc --no-deps --open

build-doc:
cargo doc
cargo doc --no-deps

dev:
echo Installing pre-commit hook...
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![license](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![build](https://github.com/andreiavrammsd/static_vector.rs/workflows/CI/badge.svg)](https://github.com/andreiavrammsd/static_vector.rs/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/andreiavrammsd/static_vector.rs/graph/badge.svg?token=pCcpya0mZC)](https://codecov.io/gh/andreiavrammsd/static_vector.rs)
[![documentation](https://img.shields.io/badge/Documentation-static_vector-4EC820.svg)](https://andreiavrammsd.github.io/static_vector.rs/)

A no-std, stack-allocated vector with fixed capacity and dynamic length.

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ impl<T: Clone, const CAPACITY: usize> Vec<T, CAPACITY> {
///
/// Returns [`CapacityExceededError`] if the vector is already at full capacity.
#[inline]
#[doc(alias = "add")]
pub fn push(&mut self, value: &T) -> Result<(), CapacityExceededError> {
if self.length == CAPACITY {
return Err(CapacityExceededError);
Expand Down