commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
c48bdb0ad0d9ab45427d31479ade9260429540d9
Arsenii Lyashenko
2021-08-14T18:48:01
Fix clippy warnings
diff --git a/src/error.rs b/src/error.rs index 854af9d..2cdfe0f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -43,6 +43,8 @@ macro_rules! ctry { /// `Token`, `Range`, `Format` or `Static`/`&'static str` pub trait ErrorInfo<'s, T, R> { type Format: fmt::Display; + + #[allow(clippy::wrong_self_convention)] ...
4
22
21
0579c0b232e7bf55140f6c69ca57715b229bd4ad
Arsenii Lyashenko
2021-08-14T18:40:40
Use alloc crate for StrLike trait
diff --git a/Cargo.toml b/Cargo.toml index 2eab960..87fb532 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,6 +65,7 @@ tokio-03 = ["pin-project", "std", "tokio-03-dep", "futures-util-03", "pin-projec tokio = ["tokio-dep", "tokio-util/io", "futures-util-03", "pin-project-lite"] futures-03 = ["pin-project", "std", "fut...
3
11
4
6f8e31048bc52fdd1c9186ad78b6a6554d225dda
Paolo Barbolini
2021-08-10T16:24:31
Remove dependency on futures-util
diff --git a/Cargo.lock b/Cargo.lock index 6f21341..b9c8ab3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -273,8 +273,8 @@ dependencies = [ "bytes 1.0.0", "criterion", "futures 0.3.8", + "futures-core", "futures-io", - "futures-util", "memchr", "once_cell", "partial-io", diff --git a/Cargo.toml b/Cargo.toml...
6
52
22
7f330b0cacd61131df88c919074ffa8136100299
Markus Westerlind
2021-07-16T13:37:22
perf: Avoid a saturating add in slice_uncons_while This is just a private method so it may depend on invariants elsewhere in the module
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index 73bd316..935988e 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -1076,6 +1076,8 @@ where { let mut i = start as usize; let len = slice.len(); + // SAFETY: We only call this function with `One` if the slice has length >= 1 + debug_asser...
1
3
2
ad4180dd7d3530d47502795ead21e13b7816aed7
Markus Westerlind
2021-07-16T13:36:04
perf: Avoid a saturating add in slice_uncons_while
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index e45fedd..73bd316 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -629,6 +629,8 @@ where { let mut i = start as usize; let len = slice.len(); + // SAFETY: We only call this function with `One` if the slice has length >= 1 + debug_assert!...
1
3
2
982e6bf6ce89f3b732b8f584544b563b6f8dae9f
Adam Perry
2021-06-21T22:09:16
Add SAFETY: comments to unsafe usages.
diff --git a/src/parser/sequence.rs b/src/parser/sequence.rs index b296966..83e3d7e 100644 --- a/src/parser/sequence.rs +++ b/src/parser/sequence.rs @@ -179,6 +179,7 @@ macro_rules! tuple_parser { } }; state.offset = $h.parser_count().0.saturating_add(1...
2
22
16
2c0a971e9f28bafedeb75e0ddeb32facf929a917
Adam Perry
2021-06-21T21:55:10
Avoid underflow in stream parsing. Underflow could lead to reading uninit bytes from the slice.
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index f38bd72..e45fedd 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -616,11 +616,18 @@ impl<'a, T> Range for &'a [T] { } } -fn slice_uncons_while<'a, T, F>(slice: &mut &'a [T], mut i: usize, mut f: F) -> &'a [T] +#[repr(usize)] +enum UnconsStart { ...
1
20
8
a97073d1319f503c734126a629c84f8ebf27adb5
Adam Perry
2021-06-21T21:52:14
Update poll_extend_buf to initialize all bytes in buffer. Removes previous UB which assumed the full chunk was initialized.
diff --git a/src/stream/buf_reader.rs b/src/stream/buf_reader.rs index 4e12b42..4bd903d 100644 --- a/src/stream/buf_reader.rs +++ b/src/stream/buf_reader.rs @@ -492,21 +492,27 @@ where R: futures_util_03::io::AsyncRead, { // Copy of tokio's read_buf method (but it has to force initialize the buffer) - let...
1
17
11
aee612a98994d756adf5bc6485c08180353fa4ad
Markus Westerlind
2021-06-23T11:01:49
refactor: Remove some unsafe blocks in buf_reader tokio-util now exposes the poll_read_buf function so we can use it directly instead of copying it for tokio 1.0 at least
diff --git a/Cargo.toml b/Cargo.toml index c129a2d..2eab960 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,7 @@ pin-project-lite = { version = "0.2", optional = true } tokio-02-dep = { version = "0.2.3", package = "tokio", features = ["io-util"], default-features = false, optional = true } tokio-03-dep = { ver...
2
21
52
16881f12cc2e2e1edaf51493701ded927f6ed0c7
Markus Westerlind
2021-06-16T16:04:04
(cargo-release) start next development iteration 4.6.1-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index deacbb0..6f21341 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -266,7 +266,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.6.0" +version = "4.6.1-alpha.0" dependencies = [ "async-std", "bytes 0.5.6", diff --git a/Cargo.toml b/Cargo.toml index a4448e1..c...
2
2
2
a5199c9ff48a45a773befbfb2296f3ecabfa6ed1
Markus Westerlind
2021-06-16T16:03:15
(cargo-release) version 4.6.0
diff --git a/Cargo.lock b/Cargo.lock index 3057bf5..deacbb0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -266,7 +266,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.5.3-alpha.0" +version = "4.6.0" dependencies = [ "async-std", "bytes 0.5.6", diff --git a/Cargo.toml b/Cargo.toml index e759ce6..a...
2
2
2
f0d98cdee864d69230ab3d286cfb140e218e762e
Markus Westerlind
2021-06-16T15:25:13
chore: Fix warning
diff --git a/src/lib.rs b/src/lib.rs index 6564daa..af2b713 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -884,7 +884,7 @@ mod std_tests { fn inner_error_consume() { let mut p = many::<Vec<_>, _, _>(between(char('['), char(']'), digit())); let result = p.easy_parse(position::Stream::new("[1][2][]")...
2
2
1
aa20bf641bc5deed7e521de289f2b0963034f750
Markus Westerlind
2021-06-16T14:24:13
feat: Add decode_tokio This works mostly the same as the regular `decode` function but it can be plugged into both `decode` and `decode_eof` it will work as long as the `eof` variant marks the input as non-partial. Also ensures that unexpected end of inputs always get returned so that we can detect them at the real e...
diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 5ac29c9..98a1e03 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -7,7 +7,7 @@ use crate::{ error::{ ErrorInfo, ParseError, ParseResult::{self, *}, - ResultExt, Token, Tracked, + ResultExt, StreamError, Token, Tracked...
4
129
33
07451dcaf0dacd2b3e90a0ed3117323ef2cdac7f
Markus Westerlind
2021-01-07T09:11:22
(cargo-release) start next development iteration 4.5.3-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index c6b05dc..3057bf5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -266,7 +266,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.5.2" +version = "4.5.3-alpha.0" dependencies = [ "async-std", "bytes 0.5.6", diff --git a/Cargo.toml b/Cargo.toml index 616b79c..e...
2
2
2
4ab5ee9c74617b474bae7013f10daa8e73031add
Markus Westerlind
2021-01-07T09:10:32
(cargo-release) version 4.5.2
diff --git a/Cargo.lock b/Cargo.lock index 6ad6ef8..c6b05dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -266,7 +266,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.5.2-alpha.0" +version = "4.5.2" dependencies = [ "async-std", "bytes 0.5.6", diff --git a/Cargo.toml b/Cargo.toml index 870a5de..6...
2
2
2
457de71e67be31badce6bb279ccf2f3d0448196f
Taiki Endo
2021-01-07T05:42:09
Update pin-project-lite to 0.2
diff --git a/Cargo.lock b/Cargo.lock index 48023e1..6ad6ef8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -278,7 +278,7 @@ dependencies = [ "memchr", "once_cell", "partial-io", - "pin-project-lite 0.1.11", + "pin-project-lite 0.2.0", "quick-error", "quickcheck", "regex", diff --git a/Cargo.toml b/Cargo.toml i...
2
2
2
0da108e3897467bca853ff9db999b91ea5dbead0
Markus Westerlind
2020-12-27T13:43:33
(cargo-release) start next development iteration 4.5.2-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index 3619ddc..48023e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -266,7 +266,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.5.1" +version = "4.5.2-alpha.0" dependencies = [ "async-std", "bytes 0.5.6", diff --git a/Cargo.toml b/Cargo.toml index 3abb4dc..a...
2
2
2
2bac133dda04a1bc803db4e80bf5c5dbe159654e
Markus Westerlind
2020-12-27T13:42:50
(cargo-release) version 4.5.1
diff --git a/Cargo.lock b/Cargo.lock index 56ab078..3619ddc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -266,7 +266,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.5.1-alpha.0" +version = "4.5.1" dependencies = [ "async-std", "bytes 0.5.6", diff --git a/Cargo.toml b/Cargo.toml index 749f6ee..3...
2
2
2
57c7ab6ade07285e2a3a79f20d9abdd415f99890
Markus Westerlind
2020-12-25T18:45:12
cargo update
diff --git a/Cargo.lock b/Cargo.lock index 146be6f..56ab078 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,9 +49,9 @@ dependencies = [ [[package]] name = "async-io" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a0b2bb8ae20fede194e779150fe283f...
1
77
77
306d423906dba29ad1cfb486eb8c0a867ad3e396
Markus Westerlind
2020-12-25T18:44:57
(cargo-release) start next development iteration 4.5.1-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index 073ffb7..146be6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -265,7 +265,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.5.0" +version = "4.5.1-alpha.0" dependencies = [ "async-std", "bytes 0.5.6", diff --git a/Cargo.toml b/Cargo.toml index 7ac83c8..2...
2
2
2
de5cde0caf05dc0e6f8b9a43e3ab1d9916f145f2
Markus Westerlind
2020-12-25T18:44:33
(cargo-release) version 4.5.0
diff --git a/Cargo.lock b/Cargo.lock index e21c57f..073ffb7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -265,7 +265,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.4.1-alpha.0" +version = "4.5.0" dependencies = [ "async-std", "bytes 0.5.6", diff --git a/Cargo.toml b/Cargo.toml index e42f857..7...
2
2
2
50e616df98571654ce495954b0ceb4da021c7932
Markus Westerlind
2020-12-25T16:15:52
Fix warning
diff --git a/src/stream/decoder.rs b/src/stream/decoder.rs index 235a196..9807d80 100644 --- a/src/stream/decoder.rs +++ b/src/stream/decoder.rs @@ -6,9 +6,11 @@ use crate::{ use std::{ fmt, io::{self, Read}, - pin::Pin, }; +#[cfg(feature = "pin-project-lite")] +use std::pin::Pin; + #[derive(Debug)] ...
1
3
1
32ef87b08a643c9814cb9eec6d1f3adfe220c690
Markus Westerlind
2020-12-25T13:40:38
feat: Remove pin-project-lite from the 'std' feature
diff --git a/Cargo.toml b/Cargo.toml index 4648284..e42f857 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,11 +60,11 @@ default = ["std"] # Run the mp4 benchmark, requires a mp4 file named `small.mp4` in the benches directory mp4 = [] pin-project = ["pin-project-lite"] -tokio-02 = ["pin-project", "std", "tokio-02-d...
3
34
14
0fea8b1b340ded23c531465013ce14a33f061773
Markus Westerlind
2020-12-25T13:35:33
refactor: Use bytes-1 instead of bytes-05 internally
diff --git a/Cargo.toml b/Cargo.toml index fd79882..4648284 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,6 +37,7 @@ tokio-dep = { version = "1", package = "tokio", default-features = false, option futures-io-03 = { version = "0.3.1", package = "futures-io", default-features = false, optional = true } futures-util-...
4
99
39
8e91f57d1ddaefafcaf244df7a7eea2096c6d6aa
Markus Westerlind
2020-12-25T13:21:23
feat: Add async decoding for tokio version 1
diff --git a/Cargo.lock b/Cargo.lock index 2dcf92f..e21c57f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,12 +97,33 @@ dependencies = [ "memchr", "num_cpus", "once_cell", - "pin-project-lite", + "pin-project-lite 0.1.11", "pin-utils", "slab", "wasm-bindgen-futures", ] +[[package]] +name = "async-stream...
7
445
23
29b3c3ecd7e44e8c32dfbb1646ef47a02f5467c1
gemmaro
2020-12-05T09:10:15
Unification of style For existing corrections, I unified the style of specifying links in the places adjacent to them. (Not all links are unified.) It also doubles as a check to see if Travis CI still fails. If the previous error log is true, that may be a bug in rustc, but I haven't investigated the smallest code to...
diff --git a/src/parser/byte.rs b/src/parser/byte.rs index 10db559..95fc4c1 100644 --- a/src/parser/byte.rs +++ b/src/parser/byte.rs @@ -258,7 +258,7 @@ parser! { /// ``` /// /// [`RangeStream`]: super::super::stream::RangeStream -/// [`range`]: ../range/fn.range.html +/// [`range`]: super::range::range pub fn byte...
2
4
4
f8b2e3eaeb529ee9e4e0fdcffde160bed9b1ce2f
gemmaro
2020-12-01T13:57:44
absolute to relative link in `src/parser/mod.rs`, The link added to the two Eithers was an absolute path, but I changed it to a relative path.
diff --git a/src/parser/mod.rs b/src/parser/mod.rs index ab38ec9..0e9e41f 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -853,7 +853,7 @@ pub trait Parser<Input: Stream> { Box::new(self) } - /// Wraps the parser into the [`Either`](crate::parser::combinator::Either) enum which allows combi...
1
2
2
5493cb4e1a9bc28315a36caa4ef777988320d844
gemmaro
2020-12-01T13:23:33
replace from_iter
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index 377746a..bddd53f 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -1137,9 +1137,7 @@ where } /// Wrapper around iterators which allows them to be treated as a stream. -/// Returned by [`from_iter`]. -/// -/// [`from_iter`]: fn.from_iter.html +/// Ret...
1
1
3
a311c08e9712ef38d9b2f374f3b306067bb94268
gemmaro
2020-12-01T13:23:00
fix easy links
diff --git a/src/stream/easy.rs b/src/stream/easy.rs index 0d699c5..a0c25f7 100644 --- a/src/stream/easy.rs +++ b/src/stream/easy.rs @@ -2,7 +2,7 @@ //! //! Unless you have specific constraints preventing you from using this error type (such as being //! a `no_std` environment) you probably want to use this stream t...
1
2
2
7aa432baa9dcedae0a8de278eed89770055a7340
gemmaro
2020-12-01T13:20:49
fix decoder links
diff --git a/src/stream/decoder.rs b/src/stream/decoder.rs index 08d2bf3..5e02aa1 100644 --- a/src/stream/decoder.rs +++ b/src/stream/decoder.rs @@ -60,16 +60,16 @@ where P: Default, S: Default, { - /// Constructs a new `Decoder` with an internal buffer. Allows any `AsyncRead/Read` instance to + /// Co...
1
6
6
3745321450747c8357738581ae0a1d914aa41a75
gemmaro
2020-12-01T13:18:00
fix range links
diff --git a/src/parser/range.rs b/src/parser/range.rs index 9f0768e..7b53fe6 100644 --- a/src/parser/range.rs +++ b/src/parser/range.rs @@ -202,9 +202,9 @@ where /// Zero-copy parser which returns a pair: (committed input range, parsed value). /// /// -/// [`combinator::recognize_with_value`][] is a non-`RangeStrea...
1
4
4
f291c636efae4557083317961548f7c022edce2d
gemmaro
2020-12-01T13:15:51
fix parser links
diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 9c19bbc..ab38ec9 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -1,6 +1,6 @@ //! A collection of both concrete parsers as well as parser combinators. //! -//! Implements the `Parser` trait which is the core of `combine` and contains the submodules +/...
1
12
12
c757bcc3503f5883a910c878ecf1f2a9a3688af0
gemmaro
2020-12-01T13:10:00
fix bytes links
diff --git a/src/parser/byte.rs b/src/parser/byte.rs index 2076061..10db559 100644 --- a/src/parser/byte.rs +++ b/src/parser/byte.rs @@ -257,7 +257,7 @@ parser! { /// # } /// ``` /// -/// [`RangeStream`]: ../stream/trait.RangeStream.html +/// [`RangeStream`]: super::super::stream::RangeStream /// [`range`]: ../rang...
1
2
2
f16b350834292e6175d13369e1f50e87538fb287
gemmaro
2020-12-01T08:31:16
fix from `partial_then` to `then_partial` This confusion was in the `Parser::then` documentation. I also added more links to items related to this function.
diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 15f0104..9c19bbc 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -465,9 +465,9 @@ pub trait Parser<Input: Stream> { /// the rest of the input. /// /// Since the parser returned from `f` must have a single type it can be useful to use the ...
1
6
6
51cde1b3144fcc4a963a85d271f56953e7c798ee
Markus Westerlind
2020-11-30T10:41:19
test: Make the REadBuf usage more correct
diff --git a/tests/support/mod.rs b/tests/support/mod.rs index 5d6adc0..10758e8 100644 --- a/tests/support/mod.rs +++ b/tests/support/mod.rs @@ -76,8 +76,8 @@ where buf.initialize_unfilled(); let mut sub_buf = buf.take(len); ready!(Pin::new(&mut self.inner).poll_read(c...
1
2
2
a83be8c0886308d60d3d2c05ebac29099e0967d9
Markus Westerlind
2020-11-18T13:47:36
(cargo-release) start next development iteration 4.4.1-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index 8b45bf9..2dcf92f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.4.0" +version = "4.4.1-alpha.0" dependencies = [ "async-std", "bytes 0.5.6", diff --git a/Cargo.toml b/Cargo.toml index 7e7a37f..7...
2
2
2
73dac54e64f3b026567f787da33aa89c6253771c
Markus Westerlind
2020-11-18T13:47:17
(cargo-release) version 4.4.0
diff --git a/Cargo.lock b/Cargo.lock index ec340d6..8b45bf9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.3.3-alpha.0" +version = "4.4.0" dependencies = [ "async-std", "bytes 0.5.6", diff --git a/Cargo.toml b/Cargo.toml index 2c6f367..7...
2
2
2
d955069b5113a71e1362983e5c959ee18f8e427d
Markus Westerlind
2020-11-17T13:11:21
Fix CombineRead features
diff --git a/src/stream/buf_reader.rs b/src/stream/buf_reader.rs index 1cd93d5..b907fe2 100644 --- a/src/stream/buf_reader.rs +++ b/src/stream/buf_reader.rs @@ -84,7 +84,7 @@ impl<R> BufReader<R> { /// Invalidates all data in the internal buffer. #[inline] - #[cfg(feature = "tokio-02")] + #[cfg(any(fe...
1
2
2
9e343b2a0067ea70b049369ea1023c364c14b19d
Markus Westerlind
2020-09-11T09:27:55
feat: Add a length_prefix combinator Closes #297
diff --git a/src/parser/range.rs b/src/parser/range.rs index be768ea..87c93e0 100644 --- a/src/parser/range.rs +++ b/src/parser/range.rs @@ -11,13 +11,19 @@ use crate::{ ParseResult::{self, *}, ResultExt, StreamError, Tracked, }, - lib::marker::PhantomData, + lib::{convert::TryFrom, marker:...
1
78
2
0180421531eccb3000e943de707e79dfdb80e323
Markus Westerlind
2020-11-17T12:50:35
Fix trait bounds on stable
diff --git a/src/parser/combinator.rs b/src/parser/combinator.rs index 023d17c..d8f3f25 100644 --- a/src/parser/combinator.rs +++ b/src/parser/combinator.rs @@ -1511,7 +1511,8 @@ impl<Input, P, Q> Parser<Input> for Spanned<P> where P: Parser<Input>, Input: Stream<Position = Span<Q>>, - Q: PartialEq, + ...
1
2
1
bea4f4beab7ddc3bc93baf79c14ac8c523fa65be
Markus Westerlind
2020-11-16T12:59:30
Only attach a span if the error only has a position (Ie, a zero-sized span) Technically a breaking change as it adds a Clone bound to ParseError for easy::Errors, however I doubt this breaks anything in practise.
diff --git a/src/error.rs b/src/error.rs index bb30651..854af9d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -466,6 +466,11 @@ pub trait ParseError<Item, Range, Position>: Sized + PartialEq { errors } + fn position(&self) -> Position { + // TODO Remove the default implementation in a breaki...
4
33
4
1a70f3f4219eac71880cbb376e62d3f01c22d981
Markus Westerlind
2020-11-16T12:26:29
feat: Add a spanned combinator
diff --git a/src/error.rs b/src/error.rs index f20dbab..bb30651 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1057,12 +1057,6 @@ impl<O, E> From<StdParseResult2<O, E>> for ParseResult<O, E> { } } -#[derive(Copy, Clone, Debug)] -pub struct Span<P> { - pub start: P, - pub end: P, -} - #[cfg(all(feature ...
5
89
58
9a8fead85b3eb0d7ee21f80d076af9f59aa408d1
Markus Westerlind
2020-11-16T10:41:03
feat: Add a spanned combinator
diff --git a/Cargo.lock b/Cargo.lock index c07fb5a..6d4c54e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -107,6 +107,12 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10004c15deb332055f7a4a208190aed362cf9a7c2f6ab70a305fba50e1105f38" +[[package]] +name = "bytes" +ver...
7
238
13
65fe0af27fa560f90da2723160efd2d1782bea4f
Markus Westerlind
2020-11-16T10:09:47
feat: Allow conversion between errors with different token,range,position types As long as they implement `From` for these types. This should have been the signature of `into_other` but that would be a breaking change. So for the moment it needs a separate trait.
diff --git a/src/error.rs b/src/error.rs index 4f80f0a..6f1f939 100644 --- a/src/error.rs +++ b/src/error.rs @@ -519,6 +519,31 @@ pub trait ParseError<Item, Range, Position>: Sized + PartialEq { T: ParseError<Item, Range, Position>; } +/// Defines a conversion between two parse error types. +/// +/// Like `...
2
126
0
76dd916a49754a5c0ebfcfcf9ba6eee0e8b114c2
Waffle
2020-10-25T23:48:08
fix doc(cfg) annotations - Add `#![cfg_attr(docsrs, feature(doc_cfg))]` to the crate root, so carte's docs will be buildable with `--cfg docsrs` - Add `rustdoc-args = ["--cfg", "docsrs"]` to docs.rs-metadata, so docs.rs will build documentation with `--cfg docsrs` - Add a bunch of missing `#[cfg_attr(docsrs, doc(c...
diff --git a/Cargo.toml b/Cargo.toml index 078ee37..39d3b30 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,7 @@ edition = "2018" [package.metadata.docs.rs] all-features = true +rustdoc-args = ["--cfg", "docsrs"] [lib] name = "combine" diff --git a/src/lib.rs b/src/lib.rs index f750a66..6564daa 100644 ---...
7
22
9
b5c12b6211d14931dfb61e8cdbc10c99b006e5ec
Sebastian Thiel
2020-10-15T05:19:07
run `cargo fmt`
diff --git a/examples/date.rs b/examples/date.rs index 3005de0..3daaa72 100644 --- a/examples/date.rs +++ b/examples/date.rs @@ -158,10 +158,7 @@ where Input: Stream<Token = char>, Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, { - (date(), char('T'), time()).map(|(date, _, time)| ...
2
3
8
9fb3c8e5e32b6ec2a947008d7ef6d9bf9b912294
Sebastian Thiel
2020-10-15T04:44:55
Fix clippy for good * allow not using 'matches!()' for now due to constraint to Rust 1.40 * run with `cargo clippy --examples` to catch more issues and fix them
diff --git a/examples/async.rs b/examples/async.rs index 4ef44a3..6c7f5f0 100644 --- a/examples/async.rs +++ b/examples/async.rs @@ -32,8 +32,8 @@ pub struct LanguageServerDecoder { content_length_parses: Rc<Cell<i32>>, } -impl LanguageServerDecoder { - pub fn new() -> LanguageServerDecoder { +impl Default f...
4
16
15
c1f50d0b6e61ce7710a341e7fce37ae1af75fdf8
Sebastian Thiel
2020-10-12T16:18:53
remove matches! to restore compat. with Rust 1.40
diff --git a/src/parser/choice.rs b/src/parser/choice.rs index 4b5c16f..8efdb0c 100644 --- a/src/parser/choice.rs +++ b/src/parser/choice.rs @@ -252,7 +252,10 @@ macro_rules! tuple_choice_parser_inner { Mode: ParseMode, { let ($(ref mut $id,)+) = *self; - le...
2
24
10
27fa6c5fcdf4522696588f4504d3fbbd4196ec90
Sebastian Thiel
2020-10-10T14:38:20
(selective) cargo fmt
diff --git a/benches/json.rs b/benches/json.rs index 6861dae..8a44b97 100644 --- a/benches/json.rs +++ b/benches/json.rs @@ -125,9 +125,7 @@ where }); match c { '\\' => committed.combine(|_| back_slash_char.parse_stream(input).into_result()), - '"' => Err(Commit::Peek( - ...
10
27
18
8065f5d71097771d66b9be891655eeda733c6bec
Sebastian Thiel
2020-10-10T13:52:42
Apply changes suggested by clippy
diff --git a/src/error.rs b/src/error.rs index f8e9f79..4f80f0a 100644 --- a/src/error.rs +++ b/src/error.rs @@ -326,7 +326,7 @@ impl<T> Commit<T> { { match self { Commit::Commit(x) => match f(x) { - Ok((v, Commit::Peek(rest))) => Ok((v, Commit::Commit(rest))), + ...
10
28
54
df9a469c8f873c7c1515a50f7594f5f1a735ed5e
Markus Westerlind
2020-09-08T09:08:20
(cargo-release) start next development iteration 4.3.3-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index c0bd3a7..c07fb5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -135,7 +135,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.3.2" +version = "4.3.3-alpha.0" dependencies = [ "async-std", "bytes 0.5.3", diff --git a/Cargo.toml b/Cargo.toml index 459dfbc..0...
2
2
2
dfba2eff7a0d5021f1e316a4641e1bfcc20206f7
Markus Westerlind
2020-09-08T09:08:09
(cargo-release) version 4.3.2
diff --git a/Cargo.lock b/Cargo.lock index 90f27ab..c0bd3a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -135,7 +135,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.3.2-alpha.0" +version = "4.3.2" dependencies = [ "async-std", "bytes 0.5.3", diff --git a/Cargo.toml b/Cargo.toml index 3319ae2..4...
2
2
2
bf312d9ba4352187a9d2d9df17ed5efb6e3faf53
Markus Westerlind
2020-09-08T07:58:36
cargo fix --edition-idioms
diff --git a/benches/http.rs b/benches/http.rs index 55c291c..4330985 100644 --- a/benches/http.rs +++ b/benches/http.rs @@ -124,11 +124,11 @@ where static REQUESTS: &'static [u8] = include_bytes!("http-requests.txt"); -fn http_requests_small(b: &mut Bencher) { +fn http_requests_small(b: &mut Bencher<'_>) { h...
12
23
23
829fafcedeb7458f7c927cc46a02bd790ac1c161
Markus Westerlind
2020-09-08T07:57:41
Clippy suggestions
diff --git a/src/lib.rs b/src/lib.rs index 451afca..2764224 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -515,7 +515,7 @@ macro_rules! combine_parser_impl { $($where_clause)* { $type_name { - $($arg : $arg,)* + $($arg,)* __marker: $cra...
4
17
20
9b8e8ecd3a5c40d109f226edd0e76d835ab2a49a
Markus Westerlind
2020-08-26T15:04:23
(cargo-release) start next development iteration 4.3.2-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index b66302c..90f27ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -135,7 +135,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.3.1" +version = "4.3.2-alpha.0" dependencies = [ "async-std", "bytes 0.5.3", diff --git a/Cargo.toml b/Cargo.toml index 6d86139..3...
2
2
2
82b908d80ac21aeab27b169a1f1857a68a6bb11c
Markus Westerlind
2020-08-26T14:52:12
fix: Make the decode macros work for redis https://github.com/mitsuhiko/redis-rs/issues/358
diff --git a/src/stream/buf_reader.rs b/src/stream/buf_reader.rs index 65f4c73..6458a14 100644 --- a/src/stream/buf_reader.rs +++ b/src/stream/buf_reader.rs @@ -341,7 +341,7 @@ where } } -#[cfg(feature = "futures-util-03")] +#[cfg(feature = "futures-03")] fn poll_extend_buf<R>( buf: &mut BytesMut, cx...
3
21
19
f8ef6c555b2afb1bb91e3654d4b4957967195ddf
Johannes Maas
2020-07-11T13:43:37
Fix formatting of doc test
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index d6548c0..3a52c5b 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -1194,17 +1194,17 @@ where /// # use combine::parser::combinator::attempt; /// # use combine::parser::repeat::take_until; /// # fn main() { -/// let mut char_parser = ta...
1
9
9
9384e28cf8caa85b3b304b59b436abfb25f43ab4
Johannes Maas
2020-07-11T11:44:09
Reword documentation
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index ad53981..d6548c0 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -1332,7 +1332,7 @@ parser! { pub struct SkipRepeatUntil; type PartialState = <With<RepeatUntil<Sink, P, E>, Value<Input, ()>> as Parser<Input>>::PartialState; //...
1
3
2
093aa5db3643caab6a6c210a228b1bfc4cdd848a
Johannes Maas
2020-07-11T10:32:24
Fix doc example
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index 1c350ac..ad53981 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -1232,17 +1232,17 @@ parser! { /// # use combine::parser::combinator::attempt; /// # use combine::parser::repeat::skip_until; /// # fn main() { - /// let ...
1
9
9
a7fb17a37c173202838334c2eb1d8dbb051a67bd
Johannes Maas
2020-07-11T10:18:43
Hide closing bracket in doc example
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index d0e4cbf..1c350ac 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -1242,7 +1242,7 @@ parser! { /// // `attempt` must be used if the `end` should consume input before failing /// let mut byte_parser = skip_until(attempt(byte:...
1
1
1
4826eba4968871e787fef01dad0335ab6831041e
Johannes Maas
2020-07-11T10:03:17
Fix typo in docs
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index ed044a3..d0e4cbf 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -1239,7 +1239,7 @@ parser! { /// assert_eq!(byte_parser.parse(&b"123TAG"[..]), Ok(((), &b"TAG"[..]))); /// assert!(byte_parser.parse(&b"123TATAG"[..]).is_err(...
1
1
1
f82524c0da51d143d30a1aabdefcc14582a3d3e9
Markus Westerlind
2020-07-10T13:59:18
(cargo-release) start next development iteration 4.3.1-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index c5bf12a..a5e3d97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.3.0" +version = "4.3.1-alpha.0" dependencies = [ "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes...
2
2
2
da054a65aa2afa3acac26aece645d7f43f428c60
Markus Westerlind
2020-07-10T13:59:08
(cargo-release) version 4.3.0
diff --git a/Cargo.lock b/Cargo.lock index 48291c5..c5bf12a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.2.2-alpha.0" +version = "4.3.0" dependencies = [ "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes...
2
2
2
c8a05c41669d4aa618a9a552f230ca771addce59
Markus Westerlind
2020-07-10T12:47:14
Implement poll_write_buf so wrapping a TcpStream works
diff --git a/src/stream/buf_reader.rs b/src/stream/buf_reader.rs index c428e6e..65f4c73 100644 --- a/src/stream/buf_reader.rs +++ b/src/stream/buf_reader.rs @@ -11,7 +11,7 @@ use std::{ }; use { - bytes_05::{Buf, BytesMut}, + bytes_05::{Buf, BufMut, BytesMut}, pin_project_lite::pin_project, }; @@ -19,...
2
53
2
d65a23e81f482c6a5482e53d63c17fcbcf67d623
Markus Westerlind
2020-07-09T11:14:32
feat: Add a BufReader abstraction for Decoder
diff --git a/src/stream/buf_reader.rs b/src/stream/buf_reader.rs new file mode 100644 index 0000000..08faf74 --- /dev/null +++ b/src/stream/buf_reader.rs @@ -0,0 +1,206 @@ +use std::{ + io::{self, Read}, + mem::MaybeUninit, + pin::Pin, + task::{Context, Poll}, +}; + +use { + bytes_05::{Buf, BufMut, Bytes...
2
209
0
48a16f6bf84939da9eacb1f82b4cff6ca7f324e0
Markus Westerlind
2020-05-30T16:38:07
feat: Allow tuple structs and functions in struct_parser!
diff --git a/src/parser/sequence.rs b/src/parser/sequence.rs index b6dc492..1cec2ea 100644 --- a/src/parser/sequence.rs +++ b/src/parser/sequence.rs @@ -306,22 +306,22 @@ macro_rules! seq_parser_expr { ( $($tt)* ) }; ( (_ : $first_parser: expr, $($remaining: tt)+ ); $($tt: tt)*) => { - seq_par...
1
115
42
ade7e9b052987535272875f6829f368c2a96fd0b
Markus Westerlind
2020-05-20T20:18:46
(cargo-release) start next development iteration 4.2.2-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index 35a58ef..48291c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.2.1" +version = "4.2.2-alpha.0" dependencies = [ "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes...
2
2
2
0ae5b17ce2f63f1111414ee5271eea775e8f335d
Markus Westerlind
2020-05-20T20:17:51
(cargo-release) version 4.2.1
diff --git a/Cargo.lock b/Cargo.lock index e45d5bf..35a58ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.2.1-alpha.0" +version = "4.2.1" dependencies = [ "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes...
2
2
2
68d9dd045db18d59f6afcb2e9fa405715c5690b9
Markus Westerlind
2020-05-18T18:53:45
Compile on core
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index f3e9563..ed044a3 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -6,7 +6,7 @@ use crate::{ ParseResult::{self, *}, ResultExt, StdParseResult, StreamError, Tracked, }, - lib::{borrow::BorrowMut, marker::PhantomData, ...
1
2
2
b2649e3b467fc84ef48a91d56ec1fcb40291978e
Markus Westerlind
2020-05-18T10:54:28
perf: Use size_hint in iterate
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index 09ad4bb..44a2a17 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -6,7 +6,7 @@ use crate::{ ParseResult::{self, *}, ResultExt, StdParseResult, StreamError, Tracked, }, - lib::{borrow::BorrowMut, iter, marker::Phantom...
1
46
21
5f37857c988b81c2b0613d6f2ab14576c794ae99
Markus Westerlind
2020-05-18T10:21:38
perf: Pre-allocate collections for count* parsers If the parser knows how many elements to expect we can provide a size hint to allow the `Vec` or whatever other container that we collect into to reserve its capacity. However, since the inner parser may still fail we limit the minimum `size_hint` to avoid malformed in...
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index 331b8f7..09ad4bb 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -80,6 +80,42 @@ pub struct CountMinMax<F, P> { _marker: PhantomData<fn() -> F>, } +struct SuggestSizeHint<I> { + iterator: I, + min: usize, + max: usize, +} + ...
1
44
6
c49188d4fd559df6969ccb50179e53a1794d4c64
Markus Westerlind
2020-05-17T09:30:43
(cargo-release) start next development iteration 4.2.1-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index bb46940..e45d5bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.2.0" +version = "4.2.1-alpha.0" dependencies = [ "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes...
2
2
2
0cd57bb9f93a1afbe6da4f98ecc8aedaa8c23f74
Markus Westerlind
2020-05-17T09:30:02
(cargo-release) version 4.2.0
diff --git a/Cargo.lock b/Cargo.lock index 976b4ce..bb46940 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.1.1-alpha.0" +version = "4.2.0" dependencies = [ "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes...
2
2
2
7e90807a0949411b6aaf24a677e6530a530a1478
Markus Westerlind
2020-05-17T09:29:40
feat: Add any_send_sync_partial_state
diff --git a/src/parser/combinator.rs b/src/parser/combinator.rs index 8126035..610e243 100644 --- a/src/parser/combinator.rs +++ b/src/parser/combinator.rs @@ -908,6 +908,105 @@ where AnySendPartialStateParser(p) } +#[cfg(feature = "std")] +#[derive(Default)] +pub struct AnySendSyncPartialState(Option<Box<dyn ...
1
99
0
5e478a22a51a1138a9ba9c7e631826aa2ac49efd
Markus Westerlind
2020-04-22T20:33:06
(cargo-release) start next development iteration 4.1.1-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index bbd28d6..976b4ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.1.0" +version = "4.1.1-alpha.0" dependencies = [ "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes...
2
2
2
f7e6324d7d3cf71924d3785d1346ab3e1d4415a1
Markus Westerlind
2020-04-22T20:32:17
(cargo-release) version 4.1.0
diff --git a/Cargo.lock b/Cargo.lock index f62a16f..bbd28d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.0.2-alpha.0" +version = "4.1.0" dependencies = [ "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes...
2
2
2
a2a633eae28cc1d5d2816ca89c947b90cf1103bb
William Light
2020-04-22T18:05:19
implement then_ref/ThenRef combinator
diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 789dd51..5c0e26c 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -13,7 +13,7 @@ use crate::{ combinator::{and_then, flat_map, map, map_input, AndThen, Either, FlatMap, Map, MapInput}, error::{expected, message, silent, Expected, Messag...
2
142
15
2124f24ae5d9b02ef255c17f010e1aa1df65cdcb
Markus Westerlind
2020-01-27T14:53:28
tokio-02 and futures-03 need the std features
diff --git a/Cargo.toml b/Cargo.toml index 7a4ce51..2dc8c05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,8 +53,8 @@ default = ["std"] # Run the mp4 benchmark, requires a mp4 file named `small.mp4` in the benches directory mp4 = [] pin-project = ["pin-project-lite"] -tokio-02 = ["pin-project", "tokio-02-dep", "fut...
1
2
2
3d556b07975b75ed3f08591d81020003769ca624
Markus Westerlind
2020-01-23T08:40:06
(cargo-release) start next development iteration 4.0.2-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index 89a98e1..f62a16f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.0.1" +version = "4.0.2-alpha.0" dependencies = [ "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes...
2
2
2
b7d6c4007ca92a2df1ce82e2e8219c6a82e4834f
Markus Westerlind
2020-01-23T08:39:36
(cargo-release) version 4.0.1
diff --git a/Cargo.lock b/Cargo.lock index 8a467f7..89a98e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.0.0" +version = "4.0.1" dependencies = [ "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.5.3 (...
2
5
5
d604fe8b1647f79f219021119ddcbd0ad303eea4
Markus Westerlind
2020-01-21T14:36:35
chore: Guard against features leaking from dev-dependencies
diff --git a/Cargo.toml b/Cargo.toml index 25c082f..8adea9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ tokio-util = { version = "0.2", features = ["codec"] } partial-io = { version = "0.3", features = ["tokio", "quickcheck"] } quickcheck = "0.6" quick-error = "1.0" - +# End of dev-dependencies [fe...
1
1
1
6659f993784876bdc5d6f6145aaffe2844ada760
Markus Westerlind
2020-01-21T14:06:30
fix: Don't block decoding if there are more data in the buffer
diff --git a/src/stream/decoder.rs b/src/stream/decoder.rs index 45ea767..4cd0253 100644 --- a/src/stream/decoder.rs +++ b/src/stream/decoder.rs @@ -50,6 +50,7 @@ pub struct Decoder<S, P> { position: P, state: S, buffer: BytesMut, + end_of_input: bool, } #[cfg_attr(docsrs, doc(cfg(feature = "std")...
2
159
156
aa813fb1b486ecdc5258bf2c89e0b18a8f4fc876
Markus Westerlind
2020-01-21T11:17:26
feat: Make the decode macros take read by parameter Instead of storing in the `Decoder` struct. A breaking change but I don't believe anyone is using this yet.
diff --git a/Cargo.toml b/Cargo.toml index d22e64f..25c082f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ regex = { version = "1", optional = true } memchr = { version = "2.2", default-features = false } pin-project-lite = { version = "0.1", optional = true } # Future proofing so that tokio-0.3, tokio-0...
4
110
113
d613dc937de6e0b745f8cbcca974e3cfcb3db723
Markus Westerlind
2020-01-21T10:51:16
fix: Don't try to read into the entire buffer for std decoding
diff --git a/Cargo.lock b/Cargo.lock index a9c6659..8a467f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,7 +13,7 @@ name = "async-std" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "async-task 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +...
5
114
101
ce6050477cb43dfb399fd71ecf064f8ffd22c526
Markus Westerlind
2020-01-21T09:24:44
Use pin-project-lite
diff --git a/Cargo.lock b/Cargo.lock index b092269..a9c6659 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -125,7 +125,7 @@ dependencies = [ "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "partial-io 0.3.1 (registry+h...
3
22
25
cdd1eb73602759e24fb77660937d5a2df7a85312
Markus Westerlind
2020-01-16T17:58:30
Add a real error type for decode!
diff --git a/src/stream/decoder.rs b/src/stream/decoder.rs index 272bd62..8667d6d 100644 --- a/src/stream/decoder.rs +++ b/src/stream/decoder.rs @@ -1,19 +1,59 @@ -use crate::stream::position::IndexPositioner; +use crate::error::ParseError; -use std::io::{self, Read}; +use std::{ + fmt, + io::{self, Read}, +}; ...
5
206
102
2aa122e870d94d303b9867924521d0c406733334
Markus Westerlind
2020-01-06T14:24:25
Ensure that partial parsers are only codegenned if used
diff --git a/src/parser/mod.rs b/src/parser/mod.rs index a0dbcb8..789dd51 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -264,11 +264,7 @@ pub trait Parser<Input: Stream> { M: ParseMode, Self: Sized, { - if mode.is_first() { - self.parse_mode_impl(FirstMode, input, st...
1
41
5
ca4c15c8cb35e6008376e592219e132b00937722
Markus Westerlind
2019-12-28T18:42:26
Fix opaque macro
diff --git a/src/parser/combinator.rs b/src/parser/combinator.rs index 89f3338..8126035 100644 --- a/src/parser/combinator.rs +++ b/src/parser/combinator.rs @@ -1296,7 +1296,7 @@ where #[macro_export] macro_rules! opaque { ($e: expr) => { - opaque!($e,); + $crate::opaque!($e,); }; ($e: ex...
2
3
2
07336ec168fc40aebccf48584fd081bd0e0b3921
Markus Westerlind
2019-12-25T19:03:31
Fix warning
diff --git a/src/stream/decoder.rs b/src/stream/decoder.rs index 08914e9..272bd62 100644 --- a/src/stream/decoder.rs +++ b/src/stream/decoder.rs @@ -1,9 +1,6 @@ use crate::stream::position::IndexPositioner; -use std::{ - io::{self, Read}, - mem::MaybeUninit, -}; +use std::io::{self, Read}; #[cfg(any(feature...
1
3
4
0d88ccddb6dc18b12238e2872b2e7ce824eb125a
Markus Westerlind
2019-12-25T17:31:17
Fix test
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index b324a85..38ec412 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -1303,7 +1303,7 @@ where /// }; /// use combine::{decode, satisfy, skip_many1, many1, sep_end_by, Parser, stream::Decoder}; /// -/// let decoder = Decoder::<_, _>::new(File::open("READM...
1
1
1
ff2c34bbcc15d925f570cce1687e9dcff8a8fe8b
Markus Westerlind
2019-12-25T17:30:01
decode_tokio -> decode_tokio_02
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index 5f5dbd7..b324a85 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -1465,7 +1465,7 @@ macro_rules! decode_futures_03 { /// fs::File, /// }; /// -/// use combine::{decode_tokio, satisfy, skip_many1, many1, sep_end_by, Parser, stream::Decoder}; +/// ...
2
6
6
163c82a7b5044cd5c979bf49e415bc1f02eed526
Markus Westerlind
2019-12-25T15:34:08
Remove more unsafe
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index 9b74789..5f5dbd7 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -634,8 +634,8 @@ where } if !found { - while i < len { - if !f(unsafe { slice.get_unchecked(i).clone() }) { + while let Some(c) = slice.get(i) { + ...
1
5
5
475a6087362904a071646734c3084e2d4caca22f
Markus Westerlind
2019-12-25T15:26:16
refactor: Remove 1 unsafe
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index 276cccd..9b74789 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -1111,7 +1111,7 @@ where where F: FnMut(Self::Token) -> bool, { - if self.0.is_empty() || !f(unsafe { self.0.get_unchecked(0) }) { + if !self.0.first().map...
1
1
1
bc5b779491c66a18289bc4b237d281bd391b1d69
Markus Westerlind
2019-12-25T15:18:31
feat: Relax the decode*! macros to no longer need BufRead Instead the buffering is fully done it the `Decoder`, minimazing the number of copies than are needed
diff --git a/Cargo.lock b/Cargo.lock index 52a78c3..6d2f80b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,6 +121,7 @@ dependencies = [ "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures-io 0.3.1 (registry+...
7
252
294
f403ecda68e5d7c5d5cf89d8feb26aa1b715609e
Markus Westerlind
2019-12-25T11:03:47
feat: Add decode_futures_03_buf_read
diff --git a/Cargo.lock b/Cargo.lock index 2794f0c..52a78c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,6 +8,38 @@ dependencies = [ "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "async-std" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crate...
4
487
211
2f533f02f15f06aeacc614c1e900e35250590a76
Markus Westerlind
2019-12-23T12:37:06
Fix mp4 bench
diff --git a/benches/mp4.rs b/benches/mp4.rs index 3796439..f7d0c21 100644 --- a/benches/mp4.rs +++ b/benches/mp4.rs @@ -2,15 +2,14 @@ #[macro_use] extern crate criterion; -extern crate byteorder; -extern crate combine; - use std::{fs::File, io::Read, str::from_utf8}; use { - byteorder::{BigEndian, ByteOrder...
1
5
8
813462633d2e3d0d56cf87f135e678645152a867
Markus Westerlind
2019-12-23T10:07:00
Remove the either dependency
diff --git a/Cargo.lock b/Cargo.lock index 14d898b..20e39b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,7 +92,6 @@ dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "criterion 0.3.0 (registry+http...
5
15
13
180b66360a61cc238faaf9c78bfee6c4c904924b
Markus Westerlind
2019-12-23T10:05:21
Remove the now redundant ascii dependency
diff --git a/Cargo.lock b/Cargo.lock index 91910b1..14d898b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,11 +16,6 @@ dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "ascii" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates...
3
10
22
cf6061b43e103039e3bf28b4699f85df412c160d
Markus Westerlind
2019-12-19T16:04:56
Version 4.0.0-beta.2
diff --git a/Cargo.lock b/Cargo.lock index 1d8f1dd..91910b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,7 +92,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.0.0-beta.1" +version = "4.0.0-beta.2" dependencies = [ "ascii 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteo...
2
2
3
45781feac3cd2da252fcc999aa69c9a207af5f6a
Markus Westerlind
2019-12-19T15:54:28
feat: Increase tuple parsers to 20 elements
diff --git a/src/parser/sequence.rs b/src/parser/sequence.rs index 574525c..1d1c10a 100644 --- a/src/parser/sequence.rs +++ b/src/parser/sequence.rs @@ -142,14 +142,14 @@ macro_rules! tuple_parser { parse_mode!(Input); #[inline] - fn parse_mode_impl<M>( + fn parse_mode_...
1
11
3