From b3e75c6a446ccd32651538566dc457bf276f6649 Mon Sep 17 00:00:00 2001 From: Sam Scott Date: Thu, 17 Dec 2020 21:52:05 -0500 Subject: Set MSRV to 1.36 and test. --- .github/workflows/ci.yml | 4 ++-- README.md | 2 ++ src/error.rs | 6 +++--- src/ser.rs | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c681bb2..94f5aca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: matrix: rust: - stable - - 1.37.0 + - 1.36.0 steps: - uses: actions/checkout@v2 - name: Install Rust stable toolchain @@ -38,7 +38,7 @@ jobs: matrix: rust: - stable - - 1.37.0 + - 1.36.0 steps: - uses: actions/checkout@v2 - uses: actions/cache@v2 diff --git a/README.md b/README.md index 9a229f7..c60b104 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ This crate works with Cargo and can be found on serde_qs = "0.8" ``` +Minimum supported Rust version is 1.36. + [crates.io]: https://crates.io/crates/serde_qs ## License diff --git a/src/error.rs b/src/error.rs index b7c2042..e303abf 100644 --- a/src/error.rs +++ b/src/error.rs @@ -41,7 +41,7 @@ pub enum Error { impl Error { /// Generate error to show top-level type cannot be deserialized. pub fn top_level(object: &'static str) -> Self { - Self::Custom(format!( + Error::Custom(format!( "cannot deserialize {} at the top level.\ Try deserializing into a struct.", object @@ -53,7 +53,7 @@ impl Error { where T: Display, { - Self::Parse(msg.to_string(), position) + Error::Parse(msg.to_string(), position) } } @@ -62,7 +62,7 @@ impl de::Error for Error { where T: Display, { - Self::Custom(msg.to_string()) + Error::Custom(msg.to_string()) } } diff --git a/src/ser.rs b/src/ser.rs index 6107694..dcd58c2 100644 --- a/src/ser.rs +++ b/src/ser.rs @@ -167,7 +167,7 @@ impl<'a, W: 'a + Write> QsSerializer<'a, W> { impl Error { fn no_key() -> Self { let msg = "tried to serialize a value before serializing key"; - Self::Custom(msg.into()) + Error::Custom(msg.into()) } } -- cgit v1.2.3