Merge remote-tracking branch 'remote/main' into upgrade-llvm-zig

This commit is contained in:
Luke Boswell 2024-11-29 08:58:47 +11:00
commit 2feb5d3c2e
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
426 changed files with 8889 additions and 4190 deletions

View file

@ -4,6 +4,7 @@
#![allow(clippy::large_enum_variant)]
pub mod all;
mod push;
mod reference_matrix;
mod small_string_interner;
mod small_vec;
@ -12,6 +13,7 @@ mod vec_map;
mod vec_set;
pub use all::{default_hasher, BumpMap, ImEntry, ImMap, ImSet, MutMap, MutSet, SendMap};
pub use push::Push;
pub use reference_matrix::{ReferenceMatrix, Sccs, TopologicalSort};
pub use small_string_interner::SmallStringInterner;
pub use small_vec::SmallVec;

View file

@ -0,0 +1,15 @@
pub trait Push<T> {
fn push(&mut self, entry: T);
}
impl<T> Push<T> for Vec<T> {
fn push(&mut self, entry: T) {
self.push(entry);
}
}
impl<T> Push<T> for &mut Vec<T> {
fn push(&mut self, entry: T) {
(*self).push(entry);
}
}