From 81bff6df2de4e35571ee902088182ee367aa18a9 Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Thu, 23 May 2024 17:57:48 +0300 Subject: [PATCH 1/4] Update Rust stable to 1.78. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab8fe458..339ad40b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ env: # version like 1.70. Note that we only specify MAJOR.MINOR and not PATCH so that bugfixes still # come automatically. If the version specified here is no longer the latest stable version, # then please feel free to submit a PR that adjusts it along with the potential clippy fixes. - RUST_STABLE_VER: "1.77" # In quotes because otherwise (e.g.) 1.70 would be interpreted as 1.7 + RUST_STABLE_VER: "1.78" # In quotes because otherwise (e.g.) 1.70 would be interpreted as 1.7 # The purpose of checking with the minimum supported Rust toolchain is to detect its staleness. # If the compilation fails, then the version specified here needs to be bumped up to reality. # Be sure to also update the rust-version property in the workspace Cargo.toml file, From 5ebb6091b38e920c18b2038bb3dd65c8d9e8b69a Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Thu, 23 May 2024 17:58:13 +0300 Subject: [PATCH 2/4] Update dependencies. --- Cargo.lock | 8 ++++---- examples/tiny_skia_render/Cargo.toml | 2 +- fontique/Cargo.toml | 2 +- parley/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 03ba065c..a7fe13d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -309,9 +309,9 @@ checksum = "545c6c3e8bf9580e2dafee8de6f9ec14826aaf359787789c7724f1f85f47d3dc" [[package]] name = "icu_properties" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976e296217453af983efa25f287a4c1da04b9a63bf1ed63719455068e4453eb5" +checksum = "3a89401989d8fdf571b829ce1022801367ec89affc7b1e162b79eff4ae029e69" dependencies = [ "displaydoc", "icu_collections", @@ -324,9 +324,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6a86c0e384532b06b6c104814f9c1b13bcd5b64409001c0d05713a1f3529d99" +checksum = "e70a8b51ee5dd4ff8f20ee9b1dd1bc07afc110886a3747b1fec04cc6e5a15815" [[package]] name = "icu_provider" diff --git a/examples/tiny_skia_render/Cargo.toml b/examples/tiny_skia_render/Cargo.toml index 8e209b00..f9437665 100644 --- a/examples/tiny_skia_render/Cargo.toml +++ b/examples/tiny_skia_render/Cargo.toml @@ -11,7 +11,7 @@ publish = false parley = { workspace = true, default-features = true } skrifa = { workspace = true } peniko = { workspace = true } -tiny-skia = "0.11" +tiny-skia = "0.11.4" [lints] workspace = true diff --git a/fontique/Cargo.toml b/fontique/Cargo.toml index 5838a623..58f804f6 100644 --- a/fontique/Cargo.toml +++ b/fontique/Cargo.toml @@ -26,7 +26,7 @@ smallvec = "1.13.2" memmap2 = { version = "0.9.4", optional = true } unicode-script = { version = "0.5.6", optional = true } core_maths = { version = "0.1.0", optional = true } -icu_properties = "1.4.0" +icu_properties = "1.4.1" icu_locid = "1.4.0" hashbrown = "0.14.5" diff --git a/parley/Cargo.toml b/parley/Cargo.toml index 397ae4bc..b29fc9ba 100644 --- a/parley/Cargo.toml +++ b/parley/Cargo.toml @@ -20,7 +20,7 @@ libm = ["fontique/libm", "skrifa/libm", "peniko/libm"] system = ["std", "fontique/system"] [dependencies] -swash = "0.1.15" +swash = "0.1.16" skrifa = { workspace = true } peniko = { workspace = true } fontique = { workspace = true } From ee8b0356a9970024deb7b7320523312881569ab7 Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Thu, 23 May 2024 19:17:35 +0300 Subject: [PATCH 3/4] Satisfy Clippy. --- fontique/src/backend/fontconfig/config.rs | 10 +++++----- fontique/src/backend/fontconfig/mod.rs | 11 ++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/fontique/src/backend/fontconfig/config.rs b/fontique/src/backend/fontconfig/config.rs index 20a99bd6..dd3d04d5 100644 --- a/fontique/src/backend/fontconfig/config.rs +++ b/fontique/src/backend/fontconfig/config.rs @@ -4,7 +4,7 @@ //! Extremely naive fontconfig xml parser to extract the data we need. use roxmltree::Node; -use std::path::Path; +use std::path::{Path, PathBuf}; pub trait ParserSink { fn include_path(&mut self, path: &Path); @@ -175,7 +175,7 @@ fn include_config(path: &Path, sink: &mut impl ParserSink) -> std::io::Result<() Ok(()) } -fn resolve_dir(node: Node, config_file_path: impl AsRef) -> Option { +fn resolve_dir(node: Node, config_file_path: impl AsRef) -> Option { let dir_path = node.text()?; let (xdg_env, xdg_fallback) = match node.tag_name().name() { "include" => ("XDG_CONFIG_HOME", "~/.config"), @@ -184,7 +184,7 @@ fn resolve_dir(node: Node, config_file_path: impl AsRef) -> Option { - std::path::PathBuf::from(std::env::var(xdg_env).unwrap_or_else(|_| xdg_fallback.into())) + PathBuf::from(std::env::var(xdg_env).unwrap_or_else(|_| xdg_fallback.into())) .join(dir_path) } _ => { @@ -193,14 +193,14 @@ fn resolve_dir(node: Node, config_file_path: impl AsRef) -> Option parent.join(dir_path), - None => std::path::Path::new(".").join(dir_path), + None => Path::new(".").join(dir_path), } } } }; Some(if let Ok(stripped_path) = path.strip_prefix("~") { let home = config_home().unwrap_or("/".to_string()); - std::path::Path::new(&home).join(stripped_path) + Path::new(&home).join(stripped_path) } else { path }) diff --git a/fontique/src/backend/fontconfig/mod.rs b/fontique/src/backend/fontconfig/mod.rs index 69c03e7d..c08c3750 100644 --- a/fontique/src/backend/fontconfig/mod.rs +++ b/fontique/src/backend/fontconfig/mod.rs @@ -2,7 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 OR MIT use hashbrown::HashMap; -use std::{path::PathBuf, sync::Arc}; +use std::path::{Path, PathBuf}; +use std::sync::Arc; use super::{ super::{Stretch, Style, Weight}, @@ -91,7 +92,7 @@ impl SystemFonts { config::parse_config("/etc/fonts/fonts.conf".as_ref(), &mut config); if let Ok(xdg_config_home) = std::env::var("XDG_CONFIG_HOME") { config::parse_config( - std::path::PathBuf::from(xdg_config_home) + PathBuf::from(xdg_config_home) .as_path() .join("fontconfig/fonts.conf") .as_path(), @@ -99,7 +100,7 @@ impl SystemFonts { ); } else if let Ok(user_home) = std::env::var("HOME") { config::parse_config( - std::path::PathBuf::from(user_home) + PathBuf::from(user_home) .as_path() .join(".config/fontconfig/fonts.conf") .as_path(), @@ -300,9 +301,9 @@ impl config::ParserSink for Config { } } - fn include_path(&mut self, _path: &std::path::Path) {} + fn include_path(&mut self, _path: &Path) {} - fn cache_path(&mut self, path: &std::path::Path) { + fn cache_path(&mut self, path: &Path) { self.cache_dirs.push(path.into()); } From 7e4961d4c3099ff7a1d5b3fa27d158c6874b5451 Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Thu, 23 May 2024 19:19:14 +0300 Subject: [PATCH 4/4] Satisfy Clippy some more. --- fontique/src/backend/fontconfig/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontique/src/backend/fontconfig/mod.rs b/fontique/src/backend/fontconfig/mod.rs index c08c3750..c11a16df 100644 --- a/fontique/src/backend/fontconfig/mod.rs +++ b/fontique/src/backend/fontconfig/mod.rs @@ -296,7 +296,7 @@ struct Config { impl config::ParserSink for Config { fn alias(&mut self, family: &str, prefer: &[&str]) { - if let Some(generic) = super::GenericFamily::parse(family) { + if let Some(generic) = GenericFamily::parse(family) { self.generics[generic as usize].extend(prefer.iter().map(|s| s.to_string())); } }