Skip to content

Commit

Permalink
Bump MSRV to 1.60
Browse files Browse the repository at this point in the history
  • Loading branch information
RazrFalcon committed Nov 2, 2023
1 parent 7af96f0 commit 160e514
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
rust:
- 1.36.0
- 1.60.0
- stable
steps:
- name: Checkout
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Changed
Fallback to `Rc` when `Arc` isn't available.
- Fallback to `Rc` when `Arc` isn't available.
- Bump MSRV to 1.60

## [0.18.1] - 2023-09-30
### Added
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ repository = "https://github.com/RazrFalcon/roxmltree"
documentation = "https://docs.rs/roxmltree/"
readme = "README.md"
edition = "2018"
rust-version = "1.60"

[workspace]
members = ["benches"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
![Build Status](https://github.com/RazrFalcon/roxmltree/workflows/Rust/badge.svg)
[![Crates.io](https://img.shields.io/crates/v/roxmltree.svg)](https://crates.io/crates/roxmltree)
[![Documentation](https://docs.rs/roxmltree/badge.svg)](https://docs.rs/roxmltree)
[![Rust 1.36+](https://img.shields.io/badge/rust-1.36+-orange.svg)](https://www.rust-lang.org)
[![Rust 1.60+](https://img.shields.io/badge/rust-1.60+-orange.svg)](https://www.rust-lang.org)

Represents an [XML 1.0](https://www.w3.org/TR/xml/) document as a read-only tree.

Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ License: ISC.
#![warn(missing_docs)]
#![warn(missing_copy_implementations)]
#![warn(missing_debug_implementations)]
// `matches!` available since 1.42, but we target 1.36 for now.
#![allow(clippy::match_like_matches_macro)]

extern crate alloc;

Expand Down
11 changes: 2 additions & 9 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,7 @@ impl<'input> Document<'input> {

let new_child_id = NodeId::from(self.nodes.len());

let appending_element = match kind {
NodeKind::Element { .. } => true,
_ => false,
};

let appending_element = matches!(kind, NodeKind::Element { .. });
self.nodes.push(NodeData {
parent: Some(state.parent_id),
prev_sibling: None,
Expand Down Expand Up @@ -1084,10 +1080,7 @@ fn is_normalization_required(text: &StrSpan) -> bool {
// But in rare cases it can be just an another character.

fn check(c: u8) -> bool {
match c {
b'&' | b'\t' | b'\n' | b'\r' => true,
_ => false,
}
matches!(c, b'&' | b'\t' | b'\n' | b'\r')
}

text.as_str().bytes().any(check)
Expand Down

0 comments on commit 160e514

Please sign in to comment.