Repository: toml-rs/toml (language: rust)

Issue:
build(deps): update combine requirement from 3.8.1 to 4.5.2
[//]: # (dependabot-start)
⚠️  **Dependabot Preview has been deactivated** ⚠️

This pull request was created by Dependabot Preview, and you've upgraded to Dependabot. This means it won't respond to `dependabot` commands nor will it be automatically closed if a new version is found.

If you close this pull request, Dependabot will re-create it the next time it checks for updates and everything will work as expected.

---

[//]: # (dependabot-end)
Updates the requirements on [combine](https://github.com/Marwes/combine) to permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/Marwes/combine/blob/master/CHANGELOG.md">combine's changelog</a>.</em></p>
<blockquote>
<h3>v4.5.2 (2021-01-07)</h3>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h3>v4.5.1 (2020-12-27)</h3>
<h4>Bug Fixes</h4>
<ul>
<li>Correct the tokio-02 feature (<a href="https://github.com/Marwes/combine/commit/466a50d3533118cca0bafab48451fd39f92a8233">466a50d3</a>)</li>
</ul>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h2>v4.5.0 (2020-12-25)</h2>
<h4>Features</h4>
<ul>
<li>Remove pin-project-lite from the 'std' feature (<a href="https://github.com/Marwes/combine/commit/32ef87b08a643c9814cb9eec6d1f3adfe220c690">32ef87b0</a>)</li>
<li>Add async decoding for tokio version 1 (<a href="https://github.com/Marwes/combine/commit/8e91f57d1ddaefafcaf244df7a7eea2096c6d6aa">8e91f57d</a>)</li>
</ul>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h2>v4.4.0 (2020-11-18)</h2>
<h4>Features</h4>
<ul>
<li>Add support for decoding using tokio_03 (<a href="https://github.com/Marwes/combine/commit/ce1612ffa0a15547bc967474b511ec35eaaf743f">ce1612ff</a>)</li>
<li>Add a length_prefix combinator (<a href="https://github.com/Marwes/combine/commit/9e343b2a0067ea70b049369ea1023c364c14b19d">9e343b2a</a>, closes <a href="https://github-redirect.dependabot.com/Marwes/combine/issues/297">#297</a>)</li>
<li>Add a spanned combinator (<a href="https://github.com/Marwes/combine/commit/1a70f3f4219eac71880cbb376e62d3f01c22d981">1a70f3f4</a>)</li>
<li>Add a spanned combinator (<a href="https://github.com/Marwes/combine/commit/9a8fead85b3eb0d7ee21f80d076af9f59aa408d1">9a8fead8</a>)</li>
<li>Allow conversion between errors with different token,range,position types (<a href="https://github.com/Marwes/combine/commit/65fe0af27fa560f90da2723160efd2d1782bea4f">65fe0af2</a>, breaks <a href="https://github.com/Marwes/combine/issues/">#</a>)</li>
</ul>
<h4>Breaking Changes</h4>
<ul>
<li>Allow conversion between errors with different token,range,position types (<a href="https://github.com/Marwes/combine/commit/65fe0af27fa560f90da2723160efd2d1782bea4f">65fe0af2</a>, breaks <a href="https://github.com/Marwes/combine/issues/">#</a>)</li>
</ul>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h3>v4.3.2 (2020-09-08)</h3>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/Marwes/combine/commit/4ab5ee9c74617b474bae7013f10daa8e73031add"><code>4ab5ee9</code></a> (cargo-release) version 4.5.2</li>
<li><a href="https://github.com/Marwes/combine/commit/ba33c741f78bde6d20d4a6b0f2d8108b2f0c862e"><code>ba33c74</code></a> Updated changelog</li>
<li><a href="https://github.com/Marwes/combine/commit/f5a86df2f739f4f2cec511945b28f2786850feba"><code>f5a86df</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/Marwes/combine/issues/313">#313</a> from taiki-e/pin-project-lite</li>
<li><a href="https://github.com/Marwes/combine/commit/457de71e67be31badce6bb279ccf2f3d0448196f"><code>457de71</code></a> Update pin-project-lite to 0.2</li>
<li><a href="https://github.com/Marwes/combine/commit/d75100e04c698a3b5d4ab4ea5c0000721f3558ae"><code>d75100e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/Marwes/combine/issues/312">#312</a> from Marwes/fix_tokio_02</li>
<li><a href="https://github.com/Marwes/combine/commit/0da108e3897467bca853ff9db999b91ea5dbead0"><code>0da108e</code></a> (cargo-release) start next development iteration 4.5.2-alpha.0</li>
<li><a href="https://github.com/Marwes/combine/commit/2bac133dda04a1bc803db4e80bf5c5dbe159654e"><code>2bac133</code></a> (cargo-release) version 4.5.1</li>
<li><a href="https://github.com/Marwes/combine/commit/d0bea632410ab6f6eb01011e618aaf4d020c4804"><code>d0bea63</code></a> Updated changelog</li>
<li><a href="https://github.com/Marwes/combine/commit/466a50d3533118cca0bafab48451fd39f92a8233"><code>466a50d</code></a> fix: Correct the tokio-02 feature</li>
<li><a href="https://github.com/Marwes/combine/commit/ea70d7d15ecde56e591df3ed087abb39c459dd9a"><code>ea70d7d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/Marwes/combine/issues/310">#310</a> from Marwes/tokio</li>
<li>Additional commits viewable in <a href="https://github.com/Marwes/combine/compare/3.8.1...v4.5.2">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)



</details>


Discussion / hints:

Fix patch:
diff --git a/Cargo.toml b/Cargo.toml
index 6465a079..0dc805cf 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@ edition = "2018"
 [dependencies]
 chrono = "0.4.10"
 linked-hash-map = "0.5.2"
-combine = "3.8.1"
+combine = "4.5.2"
 
 [dev-dependencies]
 serde_json = "1.0.44"
diff --git a/src/formatted.rs b/src/formatted.rs
index c524fc5b..15aba48a 100644
--- a/src/formatted.rs
+++ b/src/formatted.rs
@@ -4,7 +4,7 @@ use crate::parser::strings;
 use crate::parser::TomlError;
 use crate::table::{Item, KeyValuePairs, TableKeyValue};
 use crate::value::{Array, DateTime, InlineTable, Value};
-use combine::stream::state::State;
+use combine::stream::position::Stream as PositionStream;
 use std::iter::FromIterator;
 
 pub(crate) fn decorate_array(array: &mut Array) {
@@ -137,8 +137,8 @@ impl From<f64> for Value {
 
 macro_rules! try_parse {
     ($s:expr, $p:expr) => {{
-        use combine::Parser;
-        let result = $p.easy_parse(State::new($s));
+        use combine::EasyParser;
+        let result = $p.easy_parse(PositionStream::new($s));
         match result {
             Ok((_, ref rest)) if !rest.input.is_empty() => {
                 Err(TomlError::from_unparsed(rest.positioner, $s))
diff --git a/src/key.rs b/src/key.rs
index 7d54a365..99e20e50 100644
--- a/src/key.rs
+++ b/src/key.rs
@@ -1,6 +1,6 @@
 use crate::decor::InternalString;
 use crate::parser;
-use combine::stream::state::State;
+use combine::stream::position::Stream;
 use std::str::FromStr;
 
 /// Key as part of a Key/Value Pair or a table header.
@@ -48,8 +48,8 @@ impl FromStr for Key {
 
 impl Key {
     fn try_parse(s: &str) -> Result<Key, parser::TomlError> {
-        use combine::Parser;
-        let result = parser::key_parser().easy_parse(State::new(s));
+        use combine::EasyParser;
+        let result = parser::key_parser().easy_parse(Stream::new(s));
         match result {
             Ok((_, ref rest)) if !rest.input.is_empty() => {
                 Err(parser::TomlError::from_unparsed(rest.positioner, s))
diff --git a/src/lib.rs b/src/lib.rs
index 7faa5cdb..31d64718 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,4 @@
 #![deny(missing_docs)]
-#![deny(warnings)]
 // https://github.com/Marwes/combine/issues/172
 #![recursion_limit = "256"]
 
diff --git a/src/parser/array.rs b/src/parser/array.rs
index 5989013c..6d3f2eb5 100644
--- a/src/parser/array.rs
+++ b/src/parser/array.rs
@@ -4,8 +4,8 @@ use crate::parser::errors::CustomError;
 use crate::parser::trivia::ws_comment_newline;
 use crate::parser::value::value;
 use crate::value::{Array, Value};
-use combine::char::char;
-use combine::range::recognize_with_value;
+use combine::parser::char::char;
+use combine::parser::range::recognize_with_value;
 use combine::stream::RangeStream;
 use combine::*;
 
diff --git a/src/parser/datetime.rs b/src/parser/datetime.rs
index 9c7907ce..9dfa6dcd 100644
--- a/src/parser/datetime.rs
+++ b/src/parser/datetime.rs
@@ -1,12 +1,12 @@
 use crate::value;
-use combine::char::{char, digit};
-use combine::combinator::{skip_count_min_max, SkipCountMinMax};
-use combine::range::{recognize, recognize_with_value};
+use combine::parser::char::{char, digit};
+use combine::parser::range::{recognize, recognize_with_value};
+use combine::parser::repeat::{skip_count_min_max, SkipCountMinMax};
 use combine::stream::RangeStream;
 use combine::*;
 
 #[inline]
-pub fn repeat<P: Parser>(count: usize, parser: P) -> SkipCountMinMax<P> {
+pub fn repeat<I: Stream, P: Parser<I>>(count: usize, parser: P) -> SkipCountMinMax<I, P> {
     skip_count_min_max(count, count, parser)
 }
 
diff --git a/src/parser/document.rs b/src/parser/document.rs
index e99dd4d2..23628a58 100644
--- a/src/parser/document.rs
+++ b/src/parser/document.rs
@@ -9,9 +9,9 @@ use crate::parser::trivia::{comment, line_ending, line_trailing, newline, ws};
 use crate::parser::value::value;
 use crate::parser::{TomlError, TomlParser};
 use crate::table::{Item, TableKeyValue};
-use combine::char::char;
-use combine::range::recognize;
-use combine::stream::state::State;
+use combine::parser::char::char;
+use combine::parser::range::recognize;
+use combine::stream::position::Stream;
 use combine::stream::RangeStream;
 use combine::Parser;
 use combine::*;
@@ -23,9 +23,11 @@ toml_parser!(parse_comment, parser, {
     (comment(), line_ending()).map(|(c, e)| parser.borrow_mut().deref_mut().on_comment(c, e))
 });
 
-toml_parser!(parse_ws, parser, {
+toml_parser!(
+    parse_ws,
+    parser,
     ws().map(|w| parser.borrow_mut().deref_mut().on_ws(w))
-});
+);
 
 toml_parser!(parse_newline, parser, {
     recognize(newline()).map(|w| parser.borrow_mut().deref_mut().on_ws(w))
@@ -41,7 +43,7 @@ parser! {
     where
         [I: RangeStream<
          Range = &'a str,
-         Item = char>,
+         Token = char>,
          I::Error: ParseError<char, &'a str, <I as StreamOnce>::Position>,
          <I::Error as ParseError<char, &'a str, <I as StreamOnce>::Position>>::StreamError:
          From<std::num::ParseIntError> +
@@ -79,7 +81,7 @@ impl TomlParser {
     //                  ws )
     pub fn parse(s: &str) -> Result<Document, TomlError> {
         let parser = RefCell::new(Self::default());
-        let input = State::new(s);
+        let input = Stream::new(s);
 
         let parsed = parse_ws(&parser)
             .with(choice((
diff --git a/src/parser/errors.rs b/src/parser/errors.rs
index 14b65eb6..785afa39 100644
--- a/src/parser/errors.rs
+++ b/src/parser/errors.rs
@@ -1,6 +1,6 @@
 use combine::easy::Errors as ParseError;
 use combine::stream::easy::Error;
-use combine::stream::state::SourcePosition;
+use combine::stream::position::SourcePosition;
 use std::error::Error as StdError;
 use std::fmt::{Display, Formatter, Result};
 
@@ -118,7 +118,9 @@ impl Display for CustomError {
             CustomError::MixedArrayType {
                 ref got,
                 ref expected,
-            } => writeln!(f, "Mixed types in array: {} and {}", expected, got),
+            } => {
+                writeln!(f, "Mixed types in array: {} and {}", expected, got)
+            }
             CustomError::DuplicateKey { ref key, ref table } => {
                 writeln!(f, "Duplicate key `{}` in `{}` table", key, table)
             }
diff --git a/src/parser/inline_table.rs b/src/parser/inline_table.rs
index e508ff67..3814a282 100644
--- a/src/parser/inline_table.rs
+++ b/src/parser/inline_table.rs
@@ -6,7 +6,7 @@ use crate::parser::trivia::ws;
 use crate::parser::value::value;
 use crate::table::{Item, TableKeyValue};
 use crate::value::InlineTable;
-use combine::char::char;
+use combine::parser::char::char;
 use combine::stream::RangeStream;
 use combine::*;
 
diff --git a/src/parser/key.rs b/src/parser/key.rs
index 263089da..16aad9d3 100644
--- a/src/parser/key.rs
+++ b/src/parser/key.rs
@@ -1,6 +1,6 @@
 use crate::decor::InternalString;
 use crate::parser::strings::{basic_string, literal_string};
-use combine::range::{recognize_with_value, take_while1};
+use combine::parser::range::{recognize_with_value, take_while1};
 use combine::stream::RangeStream;
 use combine::*;
 
diff --git a/src/parser/macros.rs b/src/parser/macros.rs
index 697314a0..b9cfd1b7 100644
--- a/src/parser/macros.rs
+++ b/src/parser/macros.rs
@@ -7,7 +7,7 @@ macro_rules! parse (
                 where
                 [I: RangeStream<
                  Range = &'a str,
-                 Item = char>,
+                 Token = char>,
                  I::Error: ParseError<char, &'a str, <I as StreamOnce>::Position>,
                  <I::Error as ParseError<char, &'a str, <I as StreamOnce>::Position>>::StreamError:
                  From<std::num::ParseIntError> +
@@ -31,7 +31,7 @@ macro_rules! toml_parser (
             where
                 [I: RangeStream<
                  Range = &'a str,
-                 Item = char>,
+                 Token = char>,
                  I::Error: ParseError<char, &'a str, <I as StreamOnce>::Position>,
                  <I::Error as ParseError<char, &'a str, <I as StreamOnce>::Position>>::StreamError:
                  From<std::num::ParseIntError> +
diff --git a/src/parser/mod.rs b/src/parser/mod.rs
index e1d045cb..3bca29e3 100644
--- a/src/parser/mod.rs
+++ b/src/parser/mod.rs
@@ -41,7 +41,7 @@ impl Default for TomlParser {
 #[cfg(test)]
 mod tests {
     use crate::parser::*;
-    use combine::stream::state::State;
+    use combine::stream::position::Stream;
     use combine::*;
     use pretty_assertions::assert_eq;
     use std::fmt;
@@ -69,7 +69,7 @@ mod tests {
 
     macro_rules! parsed_float_eq {
         ($input:ident, $expected:expr) => {{
-            let parsed = numbers::float().easy_parse(State::new($input));
+            let parsed = numbers::float().easy_parse(Stream::new($input));
             assert!(parsed.is_ok());
             let (v, rest) = parsed.unwrap();
             assert!(($expected - v).abs() < std::f64::EPSILON);
@@ -79,7 +79,7 @@ mod tests {
 
     macro_rules! parsed_value_eq {
         ($input:expr) => {
-            let parsed = value::value().easy_parse(State::new(*$input));
+            let parsed = value::value().easy_parse(Stream::new(*$input));
             assert!(parsed.is_ok());
             let (v, rest) = parsed.unwrap();
             assert_eq!(v.to_string(), *$input);
@@ -89,7 +89,7 @@ mod tests {
 
     macro_rules! parsed_date_time_eq {
         ($input:expr, $is:ident) => {{
-            let parsed = value::value().easy_parse(State::new(*$input));
+            let parsed = value::value().easy_parse(Stream::new(*$input));
             assert!(parsed.is_ok());
             let (v, rest) = parsed.unwrap();
             assert_eq!(v.to_string(), *$input);
@@ -116,12 +116,12 @@ mod tests {
             (&std::i64::MAX.to_string()[..], std::i64::MAX),
         ];
         for &(input, expected) in &cases {
-            let parsed = numbers::integer().easy_parse(State::new(input));
+            let parsed = numbers::integer().easy_parse(Stream::new(input));
             parsed_eq!(parsed, expected);
         }
 
         let overflow = "1000000000000000000000000000000000";
-        let parsed = numbers::integer().easy_parse(State::new(overflow));
+        let parsed = numbers::integer().easy_parse(Stream::new(overflow));
         assert!(parsed.is_err());
     }
 
@@ -149,7 +149,7 @@ mod tests {
     fn basic_string() {
         let input =
             r#""I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF. \U0002070E""#;
-        let parsed = strings::string().easy_parse(State::new(input));
+        let parsed = strings::string().easy_parse(Stream::new(input));
         parsed_eq!(
             parsed,
             "I\'m a string. \"You can quote me\". Name\tJosé\nLocation\tSF. \u{2070E}"
@@ -171,14 +171,14 @@ Violets are blue"#,
         ];
 
         for &(input, expected) in &cases {
-            let parsed = strings::string().easy_parse(State::new(input));
+            let parsed = strings::string().easy_parse(Stream::new(input));
             parsed_eq!(parsed, expected);
         }
 
         let invalid_cases = [r#""""  """#, r#""""  \""""#];
 
         for input in &invalid_cases {
-            let parsed = strings::ml_basic_string().easy_parse(State::new(*input));
+            let parsed = strings::ml_basic_string().easy_parse(Stream::new(*input));
             assert!(parsed.is_err());
         }
     }
@@ -199,7 +199,7 @@ The quick brown \
        """"#,
         ];
         for input in &inputs {
-            let parsed = strings::string().easy_parse(State::new(*input));
+            let parsed = strings::string().easy_parse(Stream::new(*input));
             parsed_eq!(parsed, "The quick brown fox jumps over the lazy dog.");
         }
         let empties = [
@@ -211,7 +211,7 @@ The quick brown \
 """"#,
         ];
         for empty in &empties {
-            let parsed = strings::string().easy_parse(State::new(*empty));
+            let parsed = strings::string().easy_parse(Stream::new(*empty));
             parsed_eq!(parsed, "");
         }
     }
@@ -226,7 +226,7 @@ The quick brown \
         ];
 
         for input in &inputs {
-            let parsed = strings::string().easy_parse(State::new(*input));
+            let parsed = strings::string().easy_parse(Stream::new(*input));
             parsed_eq!(parsed, &input[1..input.len() - 1]);
         }
     }
@@ -234,7 +234,7 @@ The quick brown \
     #[test]
     fn ml_literal_string() {
         let input = r#"'''I [dw]on't need \d{2} apples'''"#;
-        let parsed = strings::string().easy_parse(State::new(input));
+        let parsed = strings::string().easy_parse(Stream::new(input));
         parsed_eq!(parsed, &input[3..input.len() - 3]);
         let input = r#"'''
 The first newline is
@@ -242,7 +242,7 @@ trimmed in raw strings.
    All other whitespace
    is preserved.
 '''"#;
-        let parsed = strings::string().easy_parse(State::new(input));
+        let parsed = strings::string().easy_parse(Stream::new(input));
         parsed_eq!(parsed, &input[4..input.len() - 3]);
     }
 
@@ -305,7 +305,7 @@ trimmed in raw strings.
    "#,
         ];
         for input in &inputs {
-            let parsed = trivia::ws_comment_newline().easy_parse(State::new(*input));
+            let parsed = trivia::ws_comment_newline().easy_parse(Stream::new(*input));
             assert!(parsed.is_ok());
             let (t, rest) = parsed.unwrap();
             assert!(rest.input.is_empty());
@@ -356,7 +356,7 @@ trimmed in raw strings.
 
         let invalid_inputs = [r#"["#, r#"[,]"#, r#"[,2]"#, r#"[1e165,,]"#, r#"[ 1, 2.0 ]"#];
         for input in &invalid_inputs {
-            let parsed = array::array().easy_parse(State::new(*input));
+            let parsed = array::array().easy_parse(Stream::new(*input));
             assert!(parsed.is_err());
         }
     }
@@ -374,7 +374,7 @@ trimmed in raw strings.
         }
         let invalid_inputs = [r#"{a = 1e165"#, r#"{ hello = "world", a = 2, hello = 1}"#];
         for input in &invalid_inputs {
-            let parsed = inline_table::inline_table().easy_parse(State::new(*input));
+            let parsed = inline_table::inline_table().easy_parse(Stream::new(*input));
             assert!(parsed.is_err());
         }
     }
@@ -388,7 +388,7 @@ trimmed in raw strings.
         ];
 
         for &(input, expected) in &cases {
-            let parsed = key::key().easy_parse(State::new(input));
+            let parsed = key::key().easy_parse(Stream::new(input));
             assert!(parsed.is_ok());
             let ((.., k), rest) = parsed.unwrap();
             assert_eq!(k, expected);
diff --git a/src/parser/numbers.rs b/src/parser/numbers.rs
index e7927ca0..acd81b50 100644
--- a/src/parser/numbers.rs
+++ b/src/parser/numbers.rs
@@ -1,5 +1,5 @@
-use combine::char::{char, digit, hex_digit, oct_digit, string};
-use combine::range::{range, recognize};
+use combine::parser::char::{char, digit, hex_digit, oct_digit, string};
+use combine::parser::range::{range, recognize};
 use combine::stream::RangeStream;
 use combine::*;
 
diff --git a/src/parser/strings.rs b/src/parser/strings.rs
index 36a026d5..b31227f4 100644
--- a/src/parser/strings.rs
+++ b/src/parser/strings.rs
@@ -1,9 +1,9 @@
 use crate::decor::InternalString;
 use crate::parser::errors::CustomError;
 use crate::parser::trivia::{newline, ws, ws_newlines};
-use combine::char::char;
-use combine::error::{Consumed, Info};
-use combine::range::{range, take, take_while};
+use combine::error::{Commit, Info};
+use combine::parser::char::char;
+use combine::parser::range::{range, take, take_while};
 use combine::stream::RangeStream;
 use combine::*;
 use std::char;
@@ -50,15 +50,15 @@ parse!(escape() -> char, {
         .then(|c| {
             parser(move |input| {
                 match c {
-                    'b'  => Ok(('\u{8}', Consumed::Empty(()))),
-                    'f'  => Ok(('\u{c}', Consumed::Empty(()))),
-                    'n'  => Ok(('\n',    Consumed::Empty(()))),
-                    'r'  => Ok(('\r',    Consumed::Empty(()))),
-                    't'  => Ok(('\t',    Consumed::Empty(()))),
-                    'u'  => hexescape(4).parse_stream(input),
-                    'U'  => hexescape(8).parse_stream(input),
+                    'b'  => Ok(('\u{8}', Commit::Peek(()))),
+                    'f'  => Ok(('\u{c}', Commit::Peek(()))),
+                    'n'  => Ok(('\n',    Commit::Peek(()))),
+                    'r'  => Ok(('\r',    Commit::Peek(()))),
+                    't'  => Ok(('\t',    Commit::Peek(()))),
+                    'u'  => hexescape(4).parse_stream(input).into_result(),
+                    'U'  => hexescape(8).parse_stream(input).into_result(),
                     // ['\\', '"', '/']
-                    _    => Ok((c,       Consumed::Empty(()))),
+                    _    => Ok((c,       Commit::Peek(()))),
                 }
             })
         })
@@ -78,8 +78,8 @@ parse!(basic_char() -> char, {
     satisfy(|c| is_basic_unescaped(c) || c == ESCAPE)
         .then(|c| parser(move |input| {
             match c {
-                ESCAPE => escape().parse_stream(input),
-                _      => Ok((c, Consumed::Empty(()))),
+                ESCAPE => escape().parse_stream(input).into_result(),
+                _      => Ok((c, Commit::Peek(()))),
             }
         }))
 });
@@ -110,8 +110,8 @@ parse!(ml_basic_char() -> char, {
     satisfy(|c| is_ml_basic_unescaped(c) || c == ESCAPE)
         .then(|c| parser(move |input| {
             match c {
-                ESCAPE => escape().parse_stream(input),
-                _      => Ok((c, Consumed::Empty(()))),
+                ESCAPE => escape().parse_stream(input).into_result(),
+                _      => Ok((c, Commit::Peek(()))),
             }
         }))
 });
diff --git a/src/parser/table.rs b/src/parser/table.rs
index 99f27875..2f4a442c 100644
--- a/src/parser/table.rs
+++ b/src/parser/table.rs
@@ -6,8 +6,8 @@ use crate::parser::key::key;
 use crate::parser::trivia::{line_trailing, ws};
 use crate::parser::TomlParser;
 use crate::table::{Item, Table};
-use combine::char::char;
-use combine::range::range;
+use combine::parser::char::char;
+use combine::parser::range::range;
 use combine::stream::RangeStream;
 use combine::*;
 use std::cell::RefCell;
@@ -68,7 +68,7 @@ parser! {
     where
         [I: RangeStream<
          Range = &'a str,
-         Item = char>,
+         Token = char>,
          I::Error: ParseError<char, &'a str, <I as StreamOnce>::Position>,
          <I::Error as ParseError<char, &'a str, <I as StreamOnce>::Position>>::StreamError:
          From<std::num::ParseIntError> +
diff --git a/src/parser/trivia.rs b/src/parser/trivia.rs
index 1c492b44..fc9f3da9 100644
--- a/src/parser/trivia.rs
+++ b/src/parser/trivia.rs
@@ -1,5 +1,5 @@
-use combine::char::{char, crlf, newline as lf};
-use combine::range::{recognize, take_while, take_while1};
+use combine::parser::char::{char, crlf, newline as lf};
+use combine::parser::range::{recognize, take_while, take_while1};
 use combine::stream::RangeStream;
 use combine::*;
 
diff --git a/src/parser/value.rs b/src/parser/value.rs
index 483ceb3b..2c12d09b 100644
--- a/src/parser/value.rs
+++ b/src/parser/value.rs
@@ -6,7 +6,7 @@ use crate::parser::inline_table::inline_table;
 use crate::parser::numbers::{boolean, float, integer};
 use crate::parser::strings::string;
 use crate::value as v;
-use combine::range::recognize_with_value;
+use combine::parser::range::recognize_with_value;
 use combine::stream::RangeStream;
 use combine::*;
 
diff --git a/src/value.rs b/src/value.rs
index 9416f3dc..0b9b000c 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -4,7 +4,7 @@ use crate::parser;
 use crate::table::{Item, Iter, KeyValuePairs, TableKeyValue, TableLike};
 use crate::{decorated, formatted};
 use chrono::{self, FixedOffset};
-use combine::stream::state::State;
+use combine::stream::position::Stream;
 use linked_hash_map::LinkedHashMap;
 use std::mem;
 use std::str::FromStr;
@@ -519,8 +519,8 @@ impl FromStr for Value {
 
     /// Parses a value from a &str
     fn from_str(s: &str) -> Result<Self, Self::Err> {
-        use combine::Parser;
-        let parsed = parser::value_parser().easy_parse(State::new(s));
+        use combine::EasyParser;
+        let parsed = parser::value_parser().easy_parse(Stream::new(s));
         match parsed {
             Ok((_, ref rest)) if !rest.input.is_empty() => {
                 Err(Self::Err::from_unparsed(rest.positioner, s))


Test patch: