Geoffroy Couprie
ea483e5a81
fix formatting
2021-08-14 15:47:43 +02:00
Geoffroy Couprie
5777c81cdd
update the error management doc
2021-08-14 15:43:42 +02:00
Geoffroy Couprie
ef5e0bbc9b
raise MSRV to 1.46
...
bitflags in lexical will not compile below 1.46
2021-08-13 14:47:03 +02:00
Geoffroy Couprie
4f046c61b4
unused code
2021-08-13 14:35:50 +02:00
Geoffroy Couprie
834a2caf8c
clarify combinator argument names
2021-08-13 14:35:12 +02:00
Geoffroy Couprie
43c62fd0be
compile on 1.41.1 without lexical
...
lexical is now integrating a version of bitflags that is incompatible
with Rust 1.41.1
2021-08-13 12:57:17 +02:00
Geoffroy Couprie
9ddbc00c1f
move HexDisplay to the traits module
...
remove the util module
2021-08-13 12:52:16 +02:00
Geoffroy Couprie
5637d0b37f
reintroduce dbg_dmp, move it to the error module
2021-08-13 12:49:33 +02:00
Geoffroy Couprie
caa9d4e628
fix the bitflags version for lexical-core
...
bitflags 1.3 (released yesterday) introduces some const fn usage
incompatible with Rust 1.41.1
2021-08-13 11:46:07 +02:00
Constantin Nickel
9057c7e773
fix broken intra doc link warnings
2021-08-13 11:03:55 +02:00
Constantin Nickel
ebab6ca7f0
ci: build docs with docsrs feature
2021-08-13 11:03:55 +02:00
Geoffroy Couprie
37eedf3e8b
check for min > max in fold_many_m_n too
2021-08-13 10:55:00 +02:00
Geoffroy Couprie
4a04c56507
the check for min > max in many_m_n should return a Err::Failure
2021-08-13 10:54:14 +02:00
Geoffroy Couprie
55ab2644d2
avoid a check to is_char_boundary in split_at_position* for &str
...
the call to find() returns an index in the slice that is already at a
char boundary, so the check done by split_at is not needed. The
get_unhecked call is needed instead of self.get() to prevent the
reintroduction of bound checks
2021-08-13 10:49:48 +02:00
Geoffroy Couprie
cea9829bf9
simplify split_at_position* for &[u8]
2021-08-13 10:42:12 +02:00
Geoffroy Couprie
04ed375574
use take_split instead of manual slices
2021-08-09 19:45:49 +02:00
Anders Kaseorg
39441748cc
Add to_owned for Err<Error<&[u8]>>, Err<Error<&str>>
...
When commit 981d036ca8
changed the basic
error type, it left no way for the user to take ownership of the
values of this new type.
Fixes #1254 .
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2021-08-09 19:04:24 +02:00
Geoffroy Couprie
173ce1c734
use a length check instead of PartialEq in infinite loop checks
...
many*, fold_many* and other related combinators have an infinite loop
check that makes sure the child parser is always consuming data
(otherwise it could be reapplied without ever stopping).
That check was done by testing if the remaining input was equal, which
consists of a length test, then checking equality of all the elements.
This commit replaces the equality check with just a length check (error
if remaining has same length as input), which should amoount to the same
work as PartialEq in the common case, but will generate less code
2021-08-09 18:43:11 +02:00
Geoffroy Couprie
ab42cedb9c
many_m_n should fail if min > max
2021-08-09 18:20:46 +02:00
Geoffroy Couprie
d31a752a59
fix infinite loop in escaped
...
if the "normal" parser in escaped does not consume anything, the escaped
and escaped_transform combinators would go in an infinite loop trying to
apply it, then looking for a control char that is not there, then going
back to the normal parser
2021-08-09 18:13:42 +02:00
Geoffroy Couprie
eec971a60d
fix benchmark compilation
2021-08-09 17:39:46 +02:00
cenodis
18cc1d18b9
Remove Clone trait bound from fold parsers
...
Update documentation
2021-08-09 17:35:40 +02:00
Constantin Nickel
5a65658a95
fix edition idioms
2021-08-09 17:30:00 +02:00
Constantin Nickel
f5de114da2
organize imports by feature
2021-08-09 17:29:15 +02:00
Geoffroy Couprie
386c7111b7
implement missing take_until1 combinator
2021-08-08 16:51:06 +02:00
Geoffroy Couprie
0abf07b10b
v7.0.0-alpha2
2021-08-06 14:09:35 +02:00
Geoffroy Couprie
214f623a9f
do not run the tests on MSRV
...
criterion 0.3.5 does not build on Rust 1.41.1 and dev-dependencies
cannot be made optional
2021-08-05 18:54:17 +02:00
Geoffroy Couprie
de69f69c55
rustdoc::missing_doc_code_examples is not recognized on Rust 1.41.1
2021-08-05 18:42:18 +02:00
Guillaume
0ddf113f68
🎨 🚨 cargo ftm and deprecated missing_doc_code_examples
2021-08-05 18:34:21 +02:00
Geoffroy Couprie
d3323ae948
fmt
2021-08-05 18:33:49 +02:00
Geoffroy Couprie
a2b683b119
remove ErrorKind::ParseTo
2021-08-05 18:30:44 +02:00
Geoffroy Couprie
25d3148aff
cleanup
...
the combinators in the form "<function name>c" were used to fix type
inference issues in macro combinators that call the main function
combinators.
They are not used anymore and were not part of the public API
2021-08-05 18:27:17 +02:00
Constantin Nickel
59bf911ad8
remove macros from bytes module
2021-08-05 18:09:39 +02:00
Geoffroy Couprie
f49ba8e9d4
remove macros from combinator, error and util modules
2021-08-05 18:06:53 +02:00
Geoffroy Couprie
977f93fed4
remove macros from character module
2021-08-05 17:25:47 +02:00
Geoffroy Couprie
55279a2a31
remove macros from bits module
2021-08-05 17:12:22 +02:00
Geoffroy Couprie
14f0872232
remove macros from sequence module
2021-08-05 17:10:38 +02:00
Guillaume
e6ff424afa
[bench] http: function parser, fix deprecated bench
2021-08-05 16:20:15 +02:00
Constantin Nickel
ea4c1bb0fa
remove broken and obsolete macro examples
2021-08-05 16:18:39 +02:00
Constantin Nickel
6f1d7a50e3
fix branch/bytes/multi test imports for the alloc
feature
2021-08-05 16:18:39 +02:00
Constantin Nickel
02ff562092
remove macros from issue tests
2021-08-05 16:18:39 +02:00
Constantin Nickel
71b98465fe
remove macros from custom error tests
2021-08-05 16:18:39 +02:00
Constantin Nickel
9601840a2b
remove named_args macro and its tests
2021-08-05 16:18:39 +02:00
Constantin Nickel
f54616848f
remove macro related tests for previous issues
...
The type-inference tests for macros are no longer needed.
2021-08-05 16:18:39 +02:00
Constantin Nickel
7e2f70950e
remove macros from str module
2021-08-05 16:18:39 +02:00
Constantin Nickel
04ba4db00b
remove macros from number module
2021-08-05 16:10:37 +02:00
Constantin Nickel
2915439b63
fix criterion's deprecation warnings for the ini benches
2021-08-05 16:08:11 +02:00
Constantin Nickel
c8660329d8
replace the macros in the ini benches with functions
...
- ini_complete is obsolete since nom 5
- removed the copied tests from tests/ini*
2021-08-05 16:08:11 +02:00
Geoffroy Couprie
ff95cff88e
remove macros from multi module
2021-08-03 16:42:10 +02:00
Constantin Nickel
f8661f3330
replace macros in tests with functions
...
The deleted tests/test1.rs didn't contain any additional tests and was
depending on an old `stream` feature. It should be covered by the
doctests of the used functions.
2021-08-03 16:15:12 +02:00