<commit_before>use super::ExactParallelIterator;
use std::isize;
use std::sync::atomic::{AtomicUsize, Ordering};

mod consumer;
use self::consumer::CollectConsumer;

pub fn collect_into<PAR_ITER,T>(mut pi: PAR_ITER, v: &mut Vec<T>)
    where PAR_ITER: ExactParallelIterator<Item=T>,
          PAR_ITER: ExactParallelIterator,
          T: Send,
{
    let len = pi.len();
    assert!(len < (isize::MAX) as usize);

    v.truncate(0); // clear any old data
    v.reserve(len); // reserve enough space
    let target = v.as_mut_ptr(); // get a raw ptr
    let writes = AtomicUsize::new(0);
    let consumer = unsafe { // assert that target..target+len is unique and writable
        CollectConsumer::new(&writes, target, len)
    };<commit_msg>Remove stray parens.<commit_after>use super::ExactParallelIterator;
use std::isize;
use std::sync::atomic::{AtomicUsize, Ordering};

mod consumer;
use self::consumer::CollectConsumer;

pub fn collect_into<PAR_ITER,T>(mut pi: PAR_ITER, v: &mut Vec<T>)
    where PAR_ITER: ExactParallelIterator<Item=T>,
          PAR_ITER: ExactParallelIterator,
          T: Send,
{
    let len = pi.len();
    assert!(len < isize::MAX as usize);

    v.truncate(0); // clear any old data
    v.reserve(len); // reserve enough space
    let target = v.as_mut_ptr(); // get a raw ptr
    let writes = AtomicUsize::new(0);
    let consumer = unsafe { // assert that target..target+len is unique and writable
        CollectConsumer::new(&writes, target, len)
    };
{'fraction_non_alphanumeric': 0.1351714862138534, 'fraction_numerical': 0.0026899798251513113, 'mean_word_length': 3.6792452830188678, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5367120', 'n_tokens_mistral': 483, 'n_tokens_neox': 483, 'n_words': 132}