Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Commit

Permalink
git subtree pull && 2018 edition!
Browse files Browse the repository at this point in the history
Merged as of rust commit e938c2b9aae7, just before hashbrown.
  • Loading branch information
cuviper committed Apr 24, 2019
2 parents 816f5bc + 7d3ea07 commit c00f3e1
Show file tree
Hide file tree
Showing 10 changed files with 644 additions and 605 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ categories = ["concurrency", "data-structures"]
description = "HashMap and HashSet with support for Rayon parallel iterators"
license = "Apache-2.0/MIT"
readme = "README.md"
edition = "2018"

[dependencies]
rayon = "1.0"
Expand Down
4 changes: 4 additions & 0 deletions src/intrinsics.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#[inline(always)]
pub unsafe fn unlikely(b: bool) -> bool {
b
}
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ extern crate rayon;
#[cfg(test)] extern crate rand;

mod alloc;
#[cfg(rayon_hash_unstable)]
mod intrinsics;
mod ptr;

// #[stable(feature = "rust1", since = "1.0.0")]
Expand Down
2 changes: 1 addition & 1 deletion src/par/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelExtend, Pa
use std::hash::{BuildHasher, Hash};

use super::table;
use HashMap;
use crate::HashMap;

pub use self::table::{ParIntoIter, ParIter, ParIterMut};
pub use self::table::{ParKeys, ParValues, ParValuesMut};
Expand Down
2 changes: 1 addition & 1 deletion src/par/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelExtend, Pa
use std::hash::{BuildHasher, Hash};

use super::map;
use HashSet;
use crate::HashSet;

pub struct ParIntoIter<T: Send> {
inner: map::ParIntoIter<T, ()>,
Expand Down
2 changes: 1 addition & 1 deletion src/par/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::ptr;
use rayon::iter::plumbing::*;
use rayon::prelude::*;

use std_hash::table::{RawBucket, RawTable};
use crate::std_hash::table::{RawBucket, RawTable};

struct SplitBuckets<'a, K, V> {
bucket: RawBucket<K, V>,
Expand Down
Loading

0 comments on commit c00f3e1

Please sign in to comment.