staging
Sunjay Varma 5 years ago
parent 2cf3f3f566
commit f968c9a540

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save