From dabce3062ef13f8f7b57a6e30de9d4c31be30eff Mon Sep 17 00:00:00 2001 From: Jan Teske Date: Sun, 19 Apr 2020 13:10:32 +0200 Subject: [PATCH] Document and test MSRV 1.35.0 This includes two minor changes to the code to lower the MSRV from 1.37.0 to 1.35.0. --- .travis.yml | 2 ++ README.md | 5 +++++ src/svd/field.rs | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4204c310..84848143 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,8 @@ sudo: required rust: - nightly - stable + # MSRV + - 1.35.0 env: TARGET=x86_64-unknown-linux-gnu diff --git a/README.md b/README.md index 8855e833..cd4111f1 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,11 @@ This project is developed and maintained by the [Tools team][team]. ## ["Documentation"](https://docs.rs/svd-parser) +## Minimum Supported Rust Version (MSRV) + +This crate is guaranteed to compile on stable Rust 1.35.0 and up. It *might* +compile with older versions but that may change in any new patch release. + ## License Licensed under either of diff --git a/src/svd/field.rs b/src/svd/field.rs index aaec692f..e1164f49 100644 --- a/src/svd/field.rs +++ b/src/svd/field.rs @@ -44,9 +44,9 @@ impl Parse for Field { if let Some(indices) = &array_info.dim_index { assert_eq!(array_info.dim as usize, indices.len()) } - Ok(Self::Array(info, array_info)) + Ok(Field::Array(info, array_info)) } else { - Ok(Self::Single(info)) + Ok(Field::Single(info)) } } }