Skip to content

Commit 37fe2cd

Browse files
authored
chore(deps): update phf to 0.13 (#406)
* fix: fix clippy warnings * fix: fix invalid rustdoc code block attributes * chore(deps)!: update phf to 0.13 Also raises MSRV to 1.66, as it is required by phf 0.13.
1 parent 3dd4f63 commit 37fe2cd

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- nightly
1919
- beta
2020
- stable
21-
- 1.63.0
21+
- 1.66.0
2222
features:
2323
-
2424
- --features dummy_match_byte

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ readme = "README.md"
1010
keywords = ["css", "syntax", "parser"]
1111
license = "MPL-2.0"
1212
edition = "2018"
13-
rust-version = "1.63"
13+
rust-version = "1.66"
1414

1515
exclude = ["src/css-parsing-tests/**", "src/big-data-url.css"]
1616

@@ -23,7 +23,7 @@ encoding_rs = "0.8"
2323
cssparser-macros = { path = "./macros", version = "0.6.1" }
2424
dtoa-short = "0.3"
2525
itoa = "1.0"
26-
phf = { version = "0.11.2", features = ["macros"] }
26+
phf = { version = "0.13.1", features = ["macros"] }
2727
serde = { version = "1.0", features = ["derive"], optional = true }
2828
malloc_size_of = { version = "0.1", default-features = false, optional = true }
2929
smallvec = "1.0"

macros/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pub fn match_byte(input: TokenStream) -> TokenStream {
162162
for (i, ref arm) in arms.iter().enumerate() {
163163
let case_id = i + 1;
164164
let index = case_id as isize;
165-
let name = syn::Ident::new(&format!("Case{}", case_id), arm.span());
165+
let name = syn::Ident::new(&format!("Case{case_id}"), arm.span());
166166
let pat = &arm.pat;
167167
parse_pat_to_table(pat, case_id as u8, &mut wildcard, &mut table);
168168

@@ -177,7 +177,7 @@ pub fn match_byte(input: TokenStream) -> TokenStream {
177177

178178
let mut table_content = Vec::new();
179179
for entry in table.iter() {
180-
let name: syn::Path = syn::parse_str(&format!("Case::Case{}", entry)).unwrap();
180+
let name: syn::Path = syn::parse_str(&format!("Case::Case{entry}")).unwrap();
181181
table_content.push(name);
182182
}
183183
let table = quote::quote!(static __CASES: [Case; 256] = [#(#table_content),*];);

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ As a consequence, when calling another parsing function, either:
4141
4242
Examples:
4343
44-
```{rust,ignore}
44+
```rust,ignore
4545
// 'none' | <image>
4646
fn parse_background_image(context: &ParserContext, input: &mut Parser)
4747
-> Result<Option<Image>, ()> {
@@ -53,7 +53,7 @@ fn parse_background_image(context: &ParserContext, input: &mut Parser)
5353
}
5454
```
5555
56-
```{rust,ignore}
56+
```rust,ignore
5757
// [ <length> | <percentage> ] [ <length> | <percentage> ]?
5858
fn parse_border_spacing(_context: &ParserContext, input: &mut Parser)
5959
-> Result<(LengthOrPercentage, LengthOrPercentage), ()> {

src/parser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ impl fmt::Display for BasicParseErrorKind<'_> {
8080
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8181
match self {
8282
BasicParseErrorKind::UnexpectedToken(token) => {
83-
write!(f, "unexpected token: {:?}", token)
83+
write!(f, "unexpected token: {token:?}")
8484
}
8585
BasicParseErrorKind::EndOfInput => write!(f, "unexpected end of input"),
8686
BasicParseErrorKind::AtRuleInvalid(rule) => {
87-
write!(f, "invalid @ rule encountered: '@{}'", rule)
87+
write!(f, "invalid @ rule encountered: '@{rule}'")
8888
}
8989
BasicParseErrorKind::AtRuleBodyInvalid => write!(f, "invalid @ rule body encountered"),
9090
BasicParseErrorKind::QualifiedRuleInvalid => {
@@ -295,7 +295,7 @@ impl BlockType {
295295
///
296296
/// The union of two sets can be obtained with the `|` operator. Example:
297297
///
298-
/// ```{rust,ignore}
298+
/// ```rust,ignore
299299
/// input.parse_until_before(Delimiter::CurlyBracketBlock | Delimiter::Semicolon)
300300
/// ```
301301
#[derive(Copy, Clone, PartialEq, Eq, Debug)]

src/serializer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ where
286286
///
287287
/// Typical usage:
288288
///
289-
/// ```{rust,ignore}
289+
/// ```rust,ignore
290290
/// fn write_foo<W>(foo: &Foo, dest: &mut W) -> fmt::Result where W: fmt::Write {
291291
/// dest.write_str("\"")?;
292292
/// {

src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ fn delimiter_from_byte(b: &mut Bencher) {
794794
}
795795

796796
#[cfg(feature = "bench")]
797-
const BACKGROUND_IMAGE: &'static str = include_str!("big-data-url.css");
797+
const BACKGROUND_IMAGE: &str = include_str!("big-data-url.css");
798798

799799
#[cfg(feature = "bench")]
800800
#[bench]

src/tokenizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ enum SeenStatus {
229229

230230
impl<'a> Tokenizer<'a> {
231231
#[inline]
232-
pub fn new(input: &str) -> Tokenizer {
232+
pub fn new(input: &'a str) -> Self {
233233
Tokenizer {
234234
input,
235235
position: 0,

0 commit comments

Comments
 (0)