diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-11-24 19:20:10 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-11-24 19:20:10 -0700 |
| commit | da6bc6bdbf50da0eeeb4b544395c1b392d228d21 (patch) | |
| tree | 94413c03855cd94b7f6955a1bcaab8d7141b06b1 /src/x/text/line.rs | |
| parent | 7465b56cc11bb4b17ba8d994142da0b74cbb8c7e (diff) | |
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
Diffstat (limited to 'src/x/text/line.rs')
| -rw-r--r-- | src/x/text/line.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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)?; |