wezterm-char-props: allow building no_std
This commit is contained in:
5 files changed
+10
-3
No files matched your search
+2
-2
@@ -162,7 +162,7 @@ passfd = "0.1.6"
|
||||
percent-encoding = "2.3"
|
||||
pest = "2.7"
|
||||
pest_derive = "2.7"
|
||||
phf = "0.11"
|
||||
phf = {version="0.11", default-features=false}
|
||||
phf_codegen = "0.10"
|
||||
pkg-config = "0.3"
|
||||
plist = "1.7"
|
||||
@@ -221,7 +221,7 @@ time-funcs = { path = "lua-api-crates/time-funcs" }
|
||||
tiny-skia = "0.11"
|
||||
tokio = "1.43"
|
||||
toml = "0.8"
|
||||
ucd-trie = "0.1"
|
||||
ucd-trie = {version="0.1", default-features=false}
|
||||
uds_windows = "1.1"
|
||||
umask = { path = "umask" }
|
||||
unicode-normalization = "0.1.24"
|
||||
|
||||
@@ -16,6 +16,8 @@ serde = {workspace=true, optional=true}
|
||||
ucd-trie.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["serde/std", "ucd-trie/std", "phf/std"]
|
||||
use_serde = ["serde"]
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
pub mod emoji;
|
||||
pub mod emoji_presentation;
|
||||
pub mod emoji_variation;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
#[cfg(feature = "std")]
|
||||
use std::collections::HashMap;
|
||||
#[cfg(feature = "std")]
|
||||
use std::sync::LazyLock;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
pub static NERD_FONTS: LazyLock<HashMap<&'static str, char>> = LazyLock::new(build_map);
|
||||
|
||||
pub use crate::nerdfonts_data::NERD_FONT_GLYPHS;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
fn build_map() -> HashMap<&'static str, char> {
|
||||
crate::nerdfonts_data::NERD_FONT_GLYPHS
|
||||
.iter()
|
||||
|
||||
@@ -1515,7 +1515,7 @@ const WIDENED_TABLE: &'static [R] = &[
|
||||
fn in_table(arr: &[R], c: u32) -> bool {
|
||||
arr.binary_search_by(|(start, end)| {
|
||||
if c >= *start && c <= *end {
|
||||
std::cmp::Ordering::Equal
|
||||
core::cmp::Ordering::Equal
|
||||
} else {
|
||||
start.cmp(&c)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user