mirror of https://github.com/smol-rs/vec-arena
Compare commits
19 Commits
Author | SHA1 | Date |
---|---|---|
Taiki Endo | ebc092e554 | |
Taiki Endo | 3bd32225eb | |
Taiki Endo | 418b968cac | |
Taiki Endo | f20f696276 | |
Taiki Endo | 7deb87e9db | |
Taiki Endo | 69abc54c72 | |
Taiki Endo | 1b95e75635 | |
Taiki Endo | b0a09d8eda | |
Taiki Endo | abd6fc29f7 | |
Taiki Endo | 0f4e715d05 | |
Vinay Chandra Dommeti | 8a5c2de61d | |
Taiki Endo | e113df64ae | |
Taiki Endo | b14160209c | |
Taiki Endo | 97cce132a0 | |
Taiki Endo | aff1753a24 | |
Taiki Endo | 3f18133da0 | |
Taiki Endo | 0af19f5b15 | |
Stjepan Glavina | eda5b1612b | |
JayceFayne | 6d607703d0 |
|
@ -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
|
|
@ -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
|
|
@ -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 }}
|
10
.travis.yml
10
.travis.yml
|
@ -1,10 +0,0 @@
|
|||
language: rust
|
||||
|
||||
rust:
|
||||
- stable
|
||||
- beta
|
||||
- nightly
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- rust: nightly
|
|
@ -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.
|
|
@ -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"]
|
||||
|
|
13
README.md
13
README.md
|
@ -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)
|
||||
|
|
24
src/lib.rs
24
src/lib.rs
|
@ -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.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue