Introduce ruff_index crate (#4597)

This commit is contained in:
Micha Reiser 2023-05-23 17:40:35 +02:00 committed by GitHub
parent 04d273bcc7
commit 652c644c2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 681 additions and 149 deletions

View file

@ -0,0 +1,13 @@
//! Provides new-type wrappers for collections that are indexed by a [`Idx`] rather
//! than `usize`.
//!
//! Inspired by [rustc_index](https://github.com/rust-lang/rust/blob/master/compiler/rustc_index/src/lib.rs).
mod idx;
mod slice;
mod vec;
pub use idx::Idx;
pub use ruff_macros::newtype_index;
pub use slice::IndexSlice;
pub use vec::IndexVec;