68 Commits

Author SHA1 Message Date
Jorge Aparicio
424a6f6b1a WIP ObjectPool 2018-05-17 23:23:51 +02:00
Jorge Aparicio
a4d4d24d46
restore #[test] that got lost in the rebase 2018-05-14 18:56:42 +02:00
Jorge Aparicio
65ce6a6161
expect -> ok().expect 2018-05-14 18:50:27 +02:00
Jorge Aparicio
27ee3f8d7d
Merge branch 'master' into vec-fromiter 2018-05-14 18:39:48 +02:00
Jorge Aparicio
3c0daf9f03
rewrite match as expect 2018-05-14 18:37:38 +02:00
Felix Stegmaier
fe2650423e Rewrite Vec::IntoIter to avoid reversing it 2018-05-08 17:21:08 +02:00
Felix Stegmaier
53c10049aa Change Vec::from_iter to custom panic 2018-05-07 01:28:20 +02:00
Felix
c78441654f Implement FromIterator for Vec 2018-05-06 22:57:19 +02:00
Felix
fd5f4f0b3d Implement IntoIter using vec::reverse and vec::pop 2018-05-05 17:34:16 +02:00
Jorge Aparicio
747afb5fbb fix capacity to be N+1 instead of 2*N+1 2018-05-04 10:07:49 +02:00
Jorge Aparicio
7cd54a2ec2 add RingBuffer.enqueue_unchecked 2018-05-03 04:52:43 +02:00
Jorge Aparicio
ffc7849f27 avoid using NLL 2018-05-03 03:35:46 +02:00
Jorge Aparicio
af5d6d1480 add BinaryHeap.pop_unchecked 2018-04-28 07:40:48 +02:00
Jorge Aparicio
8121700a76 Hole: switch from Option to ManuallyDrop to avoid a panicking branch 2018-04-28 07:40:35 +02:00
Jorge Aparicio
22ef801d6a cargo fmt 2018-04-28 05:49:05 +02:00
Jorge Aparicio
a58995eafb add BinaryHeap.push_unchecked 2018-04-28 05:48:58 +02:00
Jorge Aparicio
05633f9b56 elide a bounds check 2018-04-28 05:45:35 +02:00
Jorge Aparicio
66585909ef re-export generic_array::ArrayLength 2018-04-27 04:53:05 +02:00
Jorge Aparicio
e8ef25eee1 add more functionality to Vec 2018-04-23 20:24:53 +02:00
Jorge Aparicio
f60ae0d3e0 add example to IndexMap.remove 2018-04-23 19:43:57 +02:00
Jorge Aparicio
f58f7abfed port IndexMap and IndexSet 2018-04-23 19:40:36 +02:00
Jorge Aparicio
c1892739f7 drop untagged-option dependency, and depend on generic-array 2018-04-22 00:41:13 +02:00
Jorge Aparicio
2fdb766d27 add Consumer.dequeue_unchecked and Producer.enqueue_unchecked 2018-04-20 03:40:32 +02:00
Jorge Aparicio
78f4f10933 RingBuffer: support smaller index types 2018-04-19 21:57:47 +02:00
bors[bot]
a8d404fbe8 Merge #26
26: Ringbuffer iterators macro r=japaric a=XOSplicer

Resolves #6 

Refactor the ring_buffer::{Iter,IterMut} implementations to use a macro, so there is less duplicate code.
Inspired by the[ slice iterator macro in lib core](https://github.com/rust-lang/rust/blob/master/src/libcore/slice/mod.rs).

I have never worked with macros to generate const / mut implementations.
So this might be a little rough.

`#![allow(stable_features)]` is needed for current rust nightly, since otherwise `conservative_impl_trait` would throw a warning. Removing the feature flag would not be backwards compatible with earlier nightly versions.

Co-authored-by: Felix <stegmaier.felix@gmail.com>
2018-04-19 19:46:33 +00:00
Jorge Aparicio
6ea256cdb2 add BinaryHeap.{capacity,iter_mut} methods 2018-04-19 18:31:19 +02:00
Jorge Aparicio
ad13b81a21 implement BinaryHeap 2018-04-18 02:47:18 +02:00
Jorge Aparicio
9fc5f71799 elide bounds check in Vec.deref{,_mut} 2018-04-13 16:21:21 +02:00
Felix
57452a8138 Refactor ring_buffer::{Iter,IterMut} to use macros 2018-04-09 23:21:05 +02:00
Felix
8e51a6138f #![allow(stable_features)]
#![feature(conservative_impl_trait)] has been stabelized in Rust 1.26, #![deny(warnings)]  would therefore break the build when a stable feature is explicitly used
2018-04-09 22:15:27 +02:00
Jorge Aparicio
c31fa98618 turn LinearMap::new into a const fn 2018-03-12 06:57:57 +01:00
Jorge Aparicio
0f4555895a remove unnecessary extern crate from example 2018-03-11 22:35:40 +01:00
Jorge Aparicio
d1e51cb43f add LinearMap 2018-03-11 22:35:27 +01:00
Jorge Aparicio
03203498f7 add Vec.swap_remove 2018-03-11 22:19:13 +01:00
Mike Hommey
c5b5a53ed3 Add AsMut and AsRef implementations for Vec and String 2018-03-07 15:04:11 +09:00
Mike Hommey
b086fa992b Remove unused features 2018-03-04 07:19:01 +09:00
Jorge Aparicio
95893d4155 v0.2.2 2018-03-01 20:38:38 +01:00
Jorge Aparicio
534aad044c cargo fmt 2018-03-01 20:30:50 +01:00
Jorge Aparicio
aa8386e857 doc tweaks 2018-03-01 20:20:34 +01:00
Jorge Aparicio
8fc5da18bc remove commented out import 2018-03-01 20:17:16 +01:00
Jorge Aparicio
b6e80a7683 make fields of Vec private; impl From for String 2018-03-01 20:15:39 +01:00
Jorge Aparicio
43e093d507 fix Vec.extend_from_slice 2018-03-01 20:06:54 +01:00
Jorge Aparicio
b7e1948976 refactor and fix String.push 2018-03-01 19:52:47 +01:00
Jorge Aparicio
0dd522268c fix warnings 2018-03-01 19:40:39 +01:00
Per
f43e08fd91 debug test 2018-03-01 19:25:00 +01:00
Per Lindgren
faad961e9c add String 2018-03-01 19:00:55 +01:00
Jorge Aparicio
0869d70877 impl Debug, PartialEq & Eq 2017-12-21 13:59:18 +01:00
Alex Helfet
0917beb92a Add method Vec::resize_default(). 2017-12-19 20:08:40 +00:00
Alex Helfet
4b33946858 Add method Vec::resize(). 2017-12-19 20:03:17 +00:00
Alex Helfet
692bd418f1 Add asserts for Vec::len() in test push_and_pop() (was sanity). 2017-12-19 20:02:25 +00:00