From da6bc6bdbf50da0eeeb4b544395c1b392d228d21 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Tue, 24 Nov 2026 19:20:10 -0700 Subject: switch to Send mutices; make the i3 protocol work that was a lot of painful debugging, but not much code in the end Force-Push: yes Change-Id: Ib38842ac3dafb4ab71ee041d0425accee1e9f067 --- src/x/text/line.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/x/text') diff --git a/src/x/text/line.rs b/src/x/text/line.rs index 5e328ed..5f02742 100644 --- a/src/x/text/line.rs +++ b/src/x/text/line.rs @@ -4,7 +4,9 @@ use crate::layout::Parcel; use crate::x::Color; use crate::x::text::{ Font, FontGraphicContext, FontList, Span }; -use std::sync::{ Arc, Mutex }; +use std::sync::Arc; + +use async_lock::Mutex; pub struct Line { @@ -27,7 +29,7 @@ impl Line { for char in text.chars() { let codepoint = char as u32; - let new_font = &self.fonts.lock()?.find_codepoint(codepoint)?; + let new_font = &self.fonts.lock_blocking().find_codepoint(codepoint)?; if let Some(old_font) = ¤t_span_font { if old_font != new_font { let span = old_font.text_span(¤t_span_text)?; -- cgit 1.4.1