Remove dependency on unicode_names2 (#3570)

This commit is contained in:
Laurenz 2024-03-07 10:56:37 +01:00 committed by GitHub
parent 5dc6ce0022
commit a483321aa0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 0 additions and 45 deletions

39
Cargo.lock generated
View File

@ -1642,16 +1642,6 @@ dependencies = [
"phf_shared",
]
[[package]]
name = "phf_codegen"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a"
dependencies = [
"phf_generator",
"phf_shared",
]
[[package]]
name = "phf_generator"
version = "0.11.2"
@ -1831,8 +1821,6 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha",
"rand_core",
]
@ -1851,9 +1839,6 @@ name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
]
[[package]]
name = "rayon"
@ -2660,7 +2645,6 @@ dependencies = [
"typst-assets",
"typst-dev-assets",
"typst-render",
"unicode_names2",
"unscanny",
"yaml-front-matter",
]
@ -2904,29 +2888,6 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
[[package]]
name = "unicode_names2"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac64ef2f016dc69dfa8283394a70b057066eb054d5fcb6b9eb17bd2ec5097211"
dependencies = [
"phf",
"unicode_names2_generator",
]
[[package]]
name = "unicode_names2_generator"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "013f6a731e80f3930de580e55ba41dfa846de4e0fdee4a701f97989cb1597d6a"
dependencies = [
"getopts",
"log",
"phf_codegen",
"rand",
"time",
]
[[package]]
name = "unsafe-libyaml"
version = "0.2.10"

View File

@ -107,7 +107,6 @@ toml = { version = "0.8", default-features = false, features = ["parse", "displa
ttf-parser = "0.20.0"
two-face = { version = "0.3.0", default-features = false, features = ["syntect-fancy"] }
typed-arena = "2"
unicode_names2 = "1.2"
unicode-bidi = "0.3.13"
unicode-ident = "1.0"
unicode-math-class = "0.1"

View File

@ -31,7 +31,6 @@ serde = { workspace = true }
serde_yaml = { workspace = true }
syntect = { workspace = true, features = ["html"] }
typed-arena = { workspace = true }
unicode_names2 = { workspace = true }
unscanny = { workspace = true }
yaml-front-matter = { workspace = true }
clap = { workspace = true, optional = true }

View File

@ -11,7 +11,6 @@ pub use self::model::*;
use comemo::Prehashed;
use ecow::{eco_format, EcoString};
use heck::ToTitleCase;
use once_cell::sync::Lazy;
use serde::Deserialize;
use serde_yaml as yaml;
@ -663,8 +662,6 @@ fn symbols_model(resolver: &dyn Resolver, group: &GroupData) -> SymbolsModel {
math_shorthand: shorthand(typst::syntax::ast::Shorthand::MATH_LIST),
codepoint: c as u32,
accent: typst::symbols::Symbol::combining_accent(c).is_some(),
unicode_name: unicode_names2::name(c)
.map(|s| s.to_string().to_title_case().into()),
alternates: symbol
.variants()
.filter(|(other, _)| other != &variant)

View File

@ -159,7 +159,6 @@ pub struct SymbolModel {
pub name: EcoString,
pub codepoint: u32,
pub accent: bool,
pub unicode_name: Option<EcoString>,
pub alternates: Vec<EcoString>,
pub markup_shorthand: Option<&'static str>,
pub math_shorthand: Option<&'static str>,