pull/271/head
Sunjay Varma 5 years ago
parent 2cf3f3f566
commit f968c9a540

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::collections::BinaryHeap; use std::collections::BinaryHeap;
use std::pin::Pin;
use crate::prelude::*; use crate::prelude::*;
use crate::stream::{Extend, IntoStream}; use crate::stream::{Extend, IntoStream};

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::collections::BinaryHeap; use std::collections::BinaryHeap;
use std::pin::Pin;
use crate::stream::{Extend, FromStream, IntoStream}; use crate::stream::{Extend, FromStream, IntoStream};

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::pin::Pin;
use crate::prelude::*; use crate::prelude::*;
use crate::stream::{Extend, IntoStream}; use crate::stream::{Extend, IntoStream};

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::pin::Pin;
use crate::stream::{Extend, FromStream, IntoStream}; use crate::stream::{Extend, FromStream, IntoStream};

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::collections::BTreeSet; use std::collections::BTreeSet;
use std::pin::Pin;
use crate::prelude::*; use crate::prelude::*;
use crate::stream::{Extend, IntoStream}; use crate::stream::{Extend, IntoStream};

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::collections::BTreeSet; use std::collections::BTreeSet;
use std::pin::Pin;
use crate::stream::{Extend, FromStream, IntoStream}; use crate::stream::{Extend, FromStream, IntoStream};

@ -1,13 +1,15 @@
use std::pin::Pin;
use std::hash::{Hash, BuildHasher};
use std::collections::HashMap; use std::collections::HashMap;
use std::hash::{BuildHasher, Hash};
use std::pin::Pin;
use crate::prelude::*; use crate::prelude::*;
use crate::stream::{Extend, IntoStream}; use crate::stream::{Extend, IntoStream};
impl<K, V, H> Extend<(K, V)> for HashMap<K, V, H> impl<K, V, H> Extend<(K, V)> for HashMap<K, V, H>
where K: Eq + Hash, where
H: BuildHasher + Default { K: Eq + Hash,
H: BuildHasher + Default,
{
fn stream_extend<'a, S: IntoStream<Item = (K, V)> + 'a>( fn stream_extend<'a, S: IntoStream<Item = (K, V)> + 'a>(
&'a mut self, &'a mut self,
stream: S, stream: S,

@ -1,12 +1,14 @@
use std::pin::Pin;
use std::hash::{Hash, BuildHasher};
use std::collections::HashMap; use std::collections::HashMap;
use std::hash::{BuildHasher, Hash};
use std::pin::Pin;
use crate::stream::{Extend, FromStream, IntoStream}; use crate::stream::{Extend, FromStream, IntoStream};
impl<K, V, H> FromStream<(K, V)> for HashMap<K, V, H> impl<K, V, H> FromStream<(K, V)> for HashMap<K, V, H>
where K: Eq + Hash, where
H: BuildHasher + Default { K: Eq + Hash,
H: BuildHasher + Default,
{
#[inline] #[inline]
fn from_stream<'a, S: IntoStream<Item = (K, V)>>( fn from_stream<'a, S: IntoStream<Item = (K, V)>>(
stream: S, stream: S,

@ -1,13 +1,15 @@
use std::pin::Pin;
use std::hash::{Hash, BuildHasher};
use std::collections::HashSet; use std::collections::HashSet;
use std::hash::{BuildHasher, Hash};
use std::pin::Pin;
use crate::prelude::*; use crate::prelude::*;
use crate::stream::{Extend, IntoStream}; use crate::stream::{Extend, IntoStream};
impl<T, H> Extend<T> for HashSet<T, H> impl<T, H> Extend<T> for HashSet<T, H>
where T: Eq + Hash, where
H: BuildHasher + Default { T: Eq + Hash,
H: BuildHasher + Default,
{
fn stream_extend<'a, S: IntoStream<Item = T> + 'a>( fn stream_extend<'a, S: IntoStream<Item = T> + 'a>(
&'a mut self, &'a mut self,
stream: S, stream: S,

@ -1,12 +1,14 @@
use std::pin::Pin;
use std::hash::{Hash, BuildHasher};
use std::collections::HashSet; use std::collections::HashSet;
use std::hash::{BuildHasher, Hash};
use std::pin::Pin;
use crate::stream::{Extend, FromStream, IntoStream}; use crate::stream::{Extend, FromStream, IntoStream};
impl<T, H> FromStream<T> for HashSet<T, H> impl<T, H> FromStream<T> for HashSet<T, H>
where T: Eq + Hash, where
H: BuildHasher + Default { T: Eq + Hash,
H: BuildHasher + Default,
{
#[inline] #[inline]
fn from_stream<'a, S: IntoStream<Item = T>>( fn from_stream<'a, S: IntoStream<Item = T>>(
stream: S, stream: S,

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::collections::LinkedList; use std::collections::LinkedList;
use std::pin::Pin;
use crate::prelude::*; use crate::prelude::*;
use crate::stream::{Extend, IntoStream}; use crate::stream::{Extend, IntoStream};

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::collections::LinkedList; use std::collections::LinkedList;
use std::pin::Pin;
use crate::stream::{Extend, FromStream, IntoStream}; use crate::stream::{Extend, FromStream, IntoStream};

@ -3,18 +3,18 @@
//! This library provides efficient implementations of the most common general purpose programming //! This library provides efficient implementations of the most common general purpose programming
//! data structures. //! data structures.
pub mod vec_deque; pub mod binary_heap;
pub mod hash_map;
pub mod hash_set;
pub mod btree_map; pub mod btree_map;
pub mod btree_set; pub mod btree_set;
pub mod binary_heap; pub mod hash_map;
pub mod hash_set;
pub mod linked_list; pub mod linked_list;
pub mod vec_deque;
pub use vec_deque::VecDeque; pub use binary_heap::BinaryHeap;
pub use hash_map::HashMap;
pub use hash_set::HashSet;
pub use btree_map::BTreeMap; pub use btree_map::BTreeMap;
pub use btree_set::BTreeSet; pub use btree_set::BTreeSet;
pub use binary_heap::BinaryHeap; pub use hash_map::HashMap;
pub use hash_set::HashSet;
pub use linked_list::LinkedList; pub use linked_list::LinkedList;
pub use vec_deque::VecDeque;

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::collections::VecDeque; use std::collections::VecDeque;
use std::pin::Pin;
use crate::prelude::*; use crate::prelude::*;
use crate::stream::{Extend, IntoStream}; use crate::stream::{Extend, IntoStream};

@ -1,5 +1,5 @@
use std::pin::Pin;
use std::collections::VecDeque; use std::collections::VecDeque;
use std::pin::Pin;
use crate::stream::{Extend, FromStream, IntoStream}; use crate::stream::{Extend, FromStream, IntoStream};

@ -1,7 +1,7 @@
use std::pin::Pin;
use std::borrow::Cow; use std::borrow::Cow;
use std::sync::Arc; use std::pin::Pin;
use std::rc::Rc; use std::rc::Rc;
use std::sync::Arc;
use crate::stream::{Extend, FromStream, IntoStream}; use crate::stream::{Extend, FromStream, IntoStream};

Loading…
Cancel
Save