mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
replace unicode-id with unicode-xid
This commit is contained in:
@@ -32,7 +32,7 @@ serialize = ["serde", "indexmap/serde-1"]
|
|||||||
deserialize = ["serde", "indexmap/serde-1"]
|
deserialize = ["serde", "indexmap/serde-1"]
|
||||||
spv-in = ["petgraph", "spirv"]
|
spv-in = ["petgraph", "spirv"]
|
||||||
spv-out = ["spirv"]
|
spv-out = ["spirv"]
|
||||||
wgsl-in = ["codespan-reporting", "hexf-parse", "unicode-id"]
|
wgsl-in = ["codespan-reporting", "hexf-parse", "unicode-xid"]
|
||||||
wgsl-out = []
|
wgsl-out = []
|
||||||
hlsl-out = []
|
hlsl-out = []
|
||||||
span = ["codespan-reporting"]
|
span = ["codespan-reporting"]
|
||||||
@@ -61,7 +61,10 @@ serde = { version = "1.0.103", features = ["derive"], optional = true }
|
|||||||
petgraph = { version ="0.6", optional = true }
|
petgraph = { version ="0.6", optional = true }
|
||||||
pp-rs = { version = "0.2.1", optional = true }
|
pp-rs = { version = "0.2.1", optional = true }
|
||||||
hexf-parse = { version = "0.2.1", optional = true }
|
hexf-parse = { version = "0.2.1", optional = true }
|
||||||
unicode-id = { version = "0.3", optional = true }
|
# update unicode-xid to the next version since it has been updated to unicode v14
|
||||||
|
# (but has no release that includes it yet)
|
||||||
|
# https://github.com/unicode-rs/unicode-xid/pull/27
|
||||||
|
unicode-xid = { version = "0.2.2", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
|
|||||||
@@ -410,12 +410,12 @@ const fn is_blankspace(c: char) -> bool {
|
|||||||
|
|
||||||
/// Returns whether or not a char is a word start (Unicode XID_Start + '_')
|
/// Returns whether or not a char is a word start (Unicode XID_Start + '_')
|
||||||
fn is_word_start(c: char) -> bool {
|
fn is_word_start(c: char) -> bool {
|
||||||
c == '_' || unicode_id::UnicodeID::is_id_start(c)
|
c == '_' || unicode_xid::UnicodeXID::is_xid_start(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns whether or not a char is a word part (Unicode XID_Continue)
|
/// Returns whether or not a char is a word part (Unicode XID_Continue)
|
||||||
fn is_word_part(c: char) -> bool {
|
fn is_word_part(c: char) -> bool {
|
||||||
unicode_id::UnicodeID::is_id_continue(c)
|
unicode_xid::UnicodeXID::is_xid_continue(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|||||||
Reference in New Issue
Block a user