Skip to content

Commit 16443ce

Browse files
authored
html5ever: prepare 0.26.1 release (#516)
* Warn on unreachable_pub to make it more obvious if API is private * Only check library dependencies against MSRV * Bump crate versions Need semver-incompatible bump after a phf bump in markup5ever.
1 parent c044930 commit 16443ce

File tree

8 files changed

+37
-23
lines changed

8 files changed

+37
-23
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
version: [1.60.0, stable, beta, nightly]
16+
version: [stable, beta, nightly]
1717
steps:
1818
- uses: actions/checkout@v3
1919

@@ -44,6 +44,19 @@ jobs:
4444
if: matrix.version == 'nightly'
4545
run: cargo doc
4646

47+
msrv:
48+
name: MSRV
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v3
52+
53+
- name: Install stable toolchain
54+
run: |
55+
rustup set profile minimal
56+
rustup override set 1.60.0
57+
58+
- run: cargo check --lib --all-features
59+
4760
build_result:
4861
name: Result
4962
runs-on: ubuntu-latest

html5ever/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "html5ever"
4-
version = "0.26.0"
4+
version = "0.27.0"
55
authors = [ "The html5ever Project Developers" ]
66
license = "MIT OR Apache-2.0"
77
repository = "https://github.com/servo/html5ever"
@@ -14,7 +14,7 @@ edition = "2021"
1414
[dependencies]
1515
log = "0.4"
1616
mac = "0.1"
17-
markup5ever = { version = "0.11", path = "../markup5ever" }
17+
markup5ever = { version = "0.12", path = "../markup5ever" }
1818

1919
[dev-dependencies]
2020
typed-arena = "2.0.2"

html5ever/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#![crate_type = "dylib"]
1212
#![cfg_attr(test, deny(warnings))]
1313
#![allow(unused_parens)]
14+
#![warn(unreachable_pub)]
1415

1516
pub use driver::{parse_document, parse_fragment, ParseOpts, Parser};
1617
pub use markup5ever::*;
@@ -21,7 +22,7 @@ pub use serialize::serialize;
2122
mod macros;
2223

2324
mod util {
24-
pub mod str;
25+
pub(crate) mod str;
2526
}
2627

2728
pub mod driver;

html5ever/src/tokenizer/char_ref/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ use std::borrow::Cow::Borrowed;
1818
use std::char::from_u32;
1919

2020
use self::State::*;
21-
pub use self::Status::*;
21+
pub(super) use self::Status::*;
2222

2323
//§ tokenizing-character-references
24-
pub struct CharRef {
24+
pub(super) struct CharRef {
2525
/// The resulting character(s)
26-
pub chars: [char; 2],
26+
pub(super) chars: [char; 2],
2727

2828
/// How many slots in `chars` are valid?
29-
pub num_chars: u8,
29+
pub(super) num_chars: u8,
3030
}
3131

32-
pub enum Status {
32+
pub(super) enum Status {
3333
Stuck,
3434
Progress,
3535
Done,
@@ -45,7 +45,7 @@ enum State {
4545
BogusName,
4646
}
4747

48-
pub struct CharRefTokenizer {
48+
pub(super) struct CharRefTokenizer {
4949
state: State,
5050
result: Option<CharRef>,
5151
is_consumed_in_attribute: bool,
@@ -61,7 +61,7 @@ pub struct CharRefTokenizer {
6161
}
6262

6363
impl CharRefTokenizer {
64-
pub fn new(is_consumed_in_attribute: bool) -> CharRefTokenizer {
64+
pub(super) fn new(is_consumed_in_attribute: bool) -> CharRefTokenizer {
6565
CharRefTokenizer {
6666
is_consumed_in_attribute,
6767
state: Begin,
@@ -78,7 +78,7 @@ impl CharRefTokenizer {
7878

7979
// A CharRefTokenizer can only tokenize one character reference,
8080
// so this method consumes the tokenizer.
81-
pub fn get_result(self) -> CharRef {
81+
pub(super) fn get_result(self) -> CharRef {
8282
self.result.expect("get_result called before done")
8383
}
8484

@@ -112,7 +112,7 @@ impl CharRefTokenizer {
112112
}
113113

114114
impl CharRefTokenizer {
115-
pub fn step<Sink: TokenSink>(
115+
pub(super) fn step<Sink: TokenSink>(
116116
&mut self,
117117
tokenizer: &mut Tokenizer<Sink>,
118118
input: &mut BufferQueue,
@@ -411,7 +411,7 @@ impl CharRefTokenizer {
411411
self.finish_none()
412412
}
413413

414-
pub fn end_of_file<Sink: TokenSink>(
414+
pub(super) fn end_of_file<Sink: TokenSink>(
415415
&mut self,
416416
tokenizer: &mut Tokenizer<Sink>,
417417
input: &mut BufferQueue,

html5ever/src/util/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
use std::fmt;
1111

12-
pub fn to_escaped_string<T: fmt::Debug>(x: &T) -> String {
12+
pub(crate) fn to_escaped_string<T: fmt::Debug>(x: &T) -> String {
1313
// FIXME: don't allocate twice
1414
let string = format!("{:?}", x);
1515
string.chars().flat_map(|c| c.escape_default()).collect()
1616
}
1717

1818
/// If `c` is an ASCII letter, return the corresponding lowercase
1919
/// letter, otherwise None.
20-
pub fn lower_ascii_letter(c: char) -> Option<char> {
20+
pub(crate) fn lower_ascii_letter(c: char) -> Option<char> {
2121
match c {
2222
'a'..='z' => Some(c),
2323
'A'..='Z' => Some((c as u8 - b'A' + b'a') as char),

markup5ever/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "markup5ever"
3-
version = "0.11.0"
3+
version = "0.12.0"
44
authors = [ "The html5ever Project Developers" ]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/servo/html5ever"

rcdom/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "markup5ever_rcdom"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
authors = [ "The html5ever Project Developers" ]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/servo/html5ever"
@@ -16,9 +16,9 @@ path = "lib.rs"
1616

1717
[dependencies]
1818
tendril = "0.4"
19-
html5ever = { version = "0.26", path = "../html5ever" }
20-
markup5ever = { version = "0.11", path = "../markup5ever" }
21-
xml5ever = { version = "0.17", path = "../xml5ever" }
19+
html5ever = { version = "0.27", path = "../html5ever" }
20+
markup5ever = { version = "0.12", path = "../markup5ever" }
21+
xml5ever = { version = "0.18", path = "../xml5ever" }
2222

2323
[dev-dependencies]
2424
serde_json = "1.0"

xml5ever/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "xml5ever"
4-
version = "0.17.0"
4+
version = "0.18.0"
55
authors = ["The xml5ever project developers"]
66
license = "MIT OR Apache-2.0"
77
repository = "https://github.com/servo/html5ever"
@@ -18,7 +18,7 @@ edition = "2021"
1818
[dependencies]
1919
log = "0.4"
2020
mac = "0.1"
21-
markup5ever = {version = "0.11", path = "../markup5ever" }
21+
markup5ever = {version = "0.12", path = "../markup5ever" }
2222

2323
[dev-dependencies]
2424
rustc-test = "0.3"

0 commit comments

Comments
 (0)