mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
Merge remote-tracking branch 'remote/main' into upgrade-llvm-zig
This commit is contained in:
commit
2feb5d3c2e
426 changed files with 8889 additions and 4190 deletions
|
@ -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;
|
||||
|
|
15
crates/compiler/collections/src/push.rs
Normal file
15
crates/compiler/collections/src/push.rs
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue