Compare commits

...

19 Commits

Author SHA1 Message Date
Taiki Endo ebc092e554
Merge pull request #18 from smol-rs/deprecated
Deprecate in favor of slab
2021-05-09 06:37:33 +09:00
Taiki Endo 3bd32225eb Deprecate in favor of slab 2021-04-25 21:44:30 +09:00
Taiki Endo 418b968cac Update build status badge 2021-03-20 17:29:25 +09:00
Taiki Endo f20f696276
Merge pull request #16 from smol-rs/next
Bump to v1.1.0
2021-03-20 16:34:57 +09:00
Taiki Endo 7deb87e9db Bump to v1.1.0 2021-03-20 16:31:51 +09:00
Taiki Endo 69abc54c72
Merge pull request #15 from smol-rs/link
Fix broken links
2021-03-20 16:30:52 +09:00
Taiki Endo 1b95e75635 Fix broken links 2021-03-20 16:28:08 +09:00
Taiki Endo b0a09d8eda
Merge pull request #14 from smol-rs/github-actions
Migrate CI to GitHub Actions
2021-03-20 16:25:19 +09:00
Taiki Endo abd6fc29f7 Migrate CI to GitHub Actions 2021-03-20 16:21:49 +09:00
Taiki Endo 0f4e715d05
Merge pull request #13 from vinaychandra/no_std
`no_std` support
2021-03-15 14:27:24 +09:00
Vinay Chandra Dommeti 8a5c2de61d
no_std support 2021-03-14 22:22:15 -07:00
Taiki Endo e113df64ae
Merge pull request #12 from smol-rs/readme
Remove readme field from Cargo.toml
2021-02-14 19:53:23 +09:00
Taiki Endo b14160209c Remove readme field from Cargo.toml 2021-02-14 19:45:00 +09:00
Taiki Endo 97cce132a0
Merge pull request #11 from smol-rs/badge
Update license badge to match Cargo.toml
2021-02-14 13:56:57 +09:00
Taiki Endo aff1753a24 Update license badge to match Cargo.toml 2021-02-14 13:36:40 +09:00
Taiki Endo 3f18133da0
Merge pull request #10 from taiki-e/url
Update URLs
2020-12-27 00:04:24 +09:00
Taiki Endo 0af19f5b15 Update URLs 2020-12-26 23:47:13 +09:00
Stjepan Glavina eda5b1612b Bump to v1.0.0 2020-09-07 16:47:13 +02:00
JayceFayne 6d607703d0
fix example links (#9) 2020-08-24 14:02:05 +01:00
8 changed files with 116 additions and 26 deletions

36
.github/workflows/build-and-test.yaml vendored Normal file
View File

@ -0,0 +1,36 @@
name: Build and test
on:
push:
branches:
- master
pull_request:
jobs:
build_and_test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
rust: [nightly, beta, stable]
steps:
- uses: actions/checkout@v2
- name: Install latest ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --all --benches --bins --examples --tests --all-features
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test

23
.github/workflows/lint.yaml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Lint
on:
push:
branches:
- master
pull_request:
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -W clippy::all

17
.github/workflows/security.yaml vendored Normal file
View File

@ -0,0 +1,17 @@
name: Security audit
on:
push:
branches:
- master
pull_request:
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,10 +0,0 @@
language: rust
rust:
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly

11
CHANGELOG.md Normal file
View File

@ -0,0 +1,11 @@
# Version 1.2.0
- **This crate is now deprecated in favor of [slab](https://crates.io/crates/slab).**
# Version 1.1.0
- Make the crate `#![no_std]`.
# Version 1.0.0
- Initial version.

View File

@ -1,11 +1,13 @@
[package]
name = "vec-arena"
version = "0.5.2"
# When publishing a new version:
# - Update CHANGELOG.md
# - Create "v1.x.y" git tag
version = "1.2.0"
authors = ["Stjepan Glavina <stjepang@gmail.com>"]
edition = "2018"
description = "A simple object arena"
repository = "https://github.com/stjepang/vec-arena"
repository = "https://github.com/smol-rs/vec-arena"
documentation = "https://docs.rs/vec-arena"
readme = "README.md"
license = "Apache-2.0 OR MIT"
categories = ["memory-management"]

View File

@ -1,10 +1,13 @@
# vec-arena
# vec-arena (deprecated)
[![Build Status](https://travis-ci.org/stjepang/vec-arena.svg?branch=master)](https://travis-ci.org/stjepang/vec-arena)
[![License](https://img.shields.io/badge/license-Apache--2.0%2FMIT-blue.svg)](https://github.com/stjepang/vec-arena)
[![Build](https://github.com/smol-rs/vec-arena/workflows/Build%20and%20test/badge.svg)](
https://github.com/smol-rs/vec-arena/actions)
[![License](https://img.shields.io/badge/license-Apache--2.0_OR_MIT-blue.svg)](https://github.com/smol-rs/vec-arena)
[![Cargo](https://img.shields.io/crates/v/vec-arena.svg)](https://crates.io/crates/vec-arena)
[![Documentation](https://docs.rs/vec-arena/badge.svg)](https://docs.rs/vec-arena)
**This crate is now deprecated in favor of [slab](https://crates.io/crates/slab).**
#### What is this?
A simple object arena.
@ -25,5 +28,5 @@ It will provide a more convenient API than a plain `Vec<T>`.
Some data structures built using `Arena<T>`:
* [Doubly linked list](https://github.com/stjepang/vec-arena/blob/master/examples/linked_list.rs)
* [Splay tree](https://github.com/stjepang/vec-arena/blob/master/examples/splay_tree.rs)
* [Doubly linked list](https://github.com/smol-rs/vec-arena/blob/master/examples/linked-list.rs)
* [Splay tree](https://github.com/smol-rs/vec-arena/blob/master/examples/splay-tree.rs)

View File

@ -10,18 +10,26 @@
//!
//! Some data structures built using `Arena<T>`:
//!
//! * [Doubly linked list](https://github.com/stjepang/vec-arena/blob/master/examples/linked_list.rs)
//! * [Splay tree](https://github.com/stjepang/vec-arena/blob/master/examples/splay_tree.rs)
//! * [Doubly linked list](https://github.com/smol-rs/vec-arena/blob/master/examples/linked-list.rs)
//! * [Splay tree](https://github.com/smol-rs/vec-arena/blob/master/examples/splay-tree.rs)
#![no_std]
#![forbid(unsafe_code)]
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
#![deprecated(
since = "1.2.0",
note = "This crate is now deprecated in favor of [slab](https://crates.io/crates/slab)."
)]
use std::fmt;
use std::iter;
use std::mem;
use std::ops::{Index, IndexMut};
use std::slice;
use std::vec;
extern crate alloc;
use alloc::fmt;
use alloc::vec;
use alloc::vec::Vec;
use core::iter;
use core::mem;
use core::ops::{Index, IndexMut};
use core::slice;
/// A slot, which is either vacant or occupied.
///