Skip to content

Commit

Permalink
Merge pull request #34 from ArazAbishov/edition-2018
Browse files Browse the repository at this point in the history
Edition 2018
  • Loading branch information
arazabishov committed Sep 17, 2019
2 parents eb23621 + 69258ef commit f6fb618
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 30 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
language: rust

rust:
- nightly
- stable

before_script:
- rustup toolchain install nightly-2019-08-09
- rustup component add --toolchain nightly-2019-08-09 rustfmt-preview
- rustup default nightly-2019-08-09
- rustup component add rustfmt

script:
- cargo fmt --all -- --check
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ members = ["pvec-core", "pvec-utils"]
name = "pvec"
version = "0.2.0"
authors = ["Araz Abishov <araz@abishov.com>"]
autobenches = false
edition = "2018"

[dependencies]
pvec-core = { version = "0.1.0", path = "pvec-core" }
Expand Down
3 changes: 0 additions & 3 deletions benches/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg_attr(test, feature(test))]

extern crate criterion;

#[cfg(feature = "arc")]
Expand All @@ -11,7 +9,6 @@ extern crate num;
extern crate pvec;
extern crate rand;
extern crate rand_xorshift;
extern crate test as test_crate;

#[cfg(all(feature = "arc", feature = "rayon-iter"))]
extern crate rayon;
Expand Down
4 changes: 2 additions & 2 deletions benches/life.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ mod stdvec {

mod rrbvec {
use super::*;
use pvec::core::RrbVec;
use crate::pvec::core::RrbVec;

#[derive(PartialEq, Eq, Clone, Debug)]
pub struct Board {
Expand Down Expand Up @@ -356,7 +356,7 @@ mod rrbvec {

mod pvec {
use super::*;
use pvec::PVec;
use crate::pvec::PVec;

#[derive(PartialEq, Eq, Clone, Debug)]
pub struct Board {
Expand Down
20 changes: 10 additions & 10 deletions benches/pythagoras.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ mod stdvec {

mod rrbvec {
use super::*;
use pvec::core::iter::RrbVecParIter;
use pvec::core::RrbVec;
use crate::pvec::core::iter::RrbVecParIter;
use crate::pvec::core::RrbVec;

/// Same as par_euclid, without using rayon.
pub fn euclid() -> u32 {
Expand Down Expand Up @@ -144,8 +144,8 @@ mod rrbvec {

mod pvec {
use super::*;
use pvec::iter::PVecParIter;
use pvec::PVec;
use crate::pvec::iter::PVecParIter;
use crate::pvec::PVec;

/// Same as par_euclid, without using rayon.
pub fn euclid() -> u32 {
Expand Down Expand Up @@ -237,8 +237,8 @@ fn euclid_serial(criterion: &mut Criterion) {
}

fn euclid_faux_serial(criterion: &mut Criterion) {
use pvec::core::iter::RrbVecParIter;
use pvec::iter::PVecParIter;
use crate::pvec::core::iter::RrbVecParIter;
use crate::pvec::iter::PVecParIter;

let mut group = criterion.benchmark_group("euclid_faux_serial");
group.bench_function("std", |b| {
Expand Down Expand Up @@ -294,8 +294,8 @@ fn euclid_parallel_one(criterion: &mut Criterion) {
}

fn euclid_parallel_outer(criterion: &mut Criterion) {
use pvec::core::iter::RrbVecParIter;
use pvec::iter::PVecParIter;
use crate::pvec::core::iter::RrbVecParIter;
use crate::pvec::iter::PVecParIter;

let mut group = criterion.benchmark_group("euclid_parallel_outer");
group.bench_function("std", |b| {
Expand All @@ -317,8 +317,8 @@ fn euclid_parallel_outer(criterion: &mut Criterion) {
}

fn euclid_parallel_full(criterion: &mut Criterion) {
use pvec::core::iter::RrbVecParIter;
use pvec::iter::PVecParIter;
use crate::pvec::core::iter::RrbVecParIter;
use crate::pvec::iter::PVecParIter;

let mut group = criterion.benchmark_group("euclid_parallel_full");
group.bench_function("std", |b| {
Expand Down
1 change: 1 addition & 0 deletions pvec-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
name = "pvec-core"
version = "0.1.0"
authors = ["Araz Abishov <araz@abishov.com>"]
edition = "2018"

[dependencies]
serde = { version = "1.0.73", features = ["rc"], optional = true}
Expand Down
4 changes: 2 additions & 2 deletions pvec-core/src/iter.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::RrbVec;
use rrbtree::iter::RrbTreeIter;
use rrbtree::BRANCH_FACTOR;
use crate::rrbtree::iter::RrbTreeIter;
use crate::rrbtree::BRANCH_FACTOR;
use std::fmt::Debug;

#[cfg(all(feature = "arc", feature = "rayon-iter"))]
Expand Down
2 changes: 0 additions & 2 deletions pvec-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(nll)]

#[macro_use]
#[cfg(feature = "serde-serializer")]
extern crate serde_json;
Expand Down
1 change: 1 addition & 0 deletions pvec-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "pvec-utils"
version = "0.1.0"
authors = ["Araz Abishov <araz@abishov.com>"]
edition = "2018"

[features]
arc = []
6 changes: 3 additions & 3 deletions src/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ pub const BRANCH_FACTOR: usize = 32;
#[cfg(all(test, feature = "small_branch"))]
pub const BRANCH_FACTOR: usize = 4;

use core::iter::RrbVecIter;
use core::RrbVec;
use crate::core::iter::RrbVecIter;
use crate::core::RrbVec;
use crate::utils::sharedptr::Take;
use std::vec::IntoIter as VecIter;
use utils::sharedptr::Take;

#[cfg(all(feature = "arc", feature = "rayon-iter"))]
use rayon::iter::plumbing::{bridge, Consumer, Producer, ProducerCallback, UnindexedConsumer};
Expand Down
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(nll)]

pub extern crate pvec_core as core;
extern crate pvec_utils as utils;

Expand All @@ -11,8 +9,8 @@ use std::ops;

pub mod iter;

use core::RrbVec;
use utils::sharedptr::SharedPtr;
use crate::core::RrbVec;
use crate::utils::sharedptr::SharedPtr;

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
enum Flavor<T> {
Expand Down

0 comments on commit f6fb618

Please sign in to comment.