summaryrefslogtreecommitdiffstats
path: root/runtime/src/font.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-05 01:13:28 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-05 01:13:28 +0200
commit88611d7653e2a22c82c41f8d1a4732c2af60adcd (patch)
tree0aa1b73fc5163d58eee2b6c74f0566deeb7ce60c /runtime/src/font.rs
parent2b19471d1cfe4cf034b026aa6620b1685a5ab772 (diff)
downloadiced-88611d7653e2a22c82c41f8d1a4732c2af60adcd.tar.gz
iced-88611d7653e2a22c82c41f8d1a4732c2af60adcd.tar.bz2
iced-88611d7653e2a22c82c41f8d1a4732c2af60adcd.zip
Hide internal `Task` constructors
Diffstat (limited to 'runtime/src/font.rs')
-rw-r--r--runtime/src/font.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/src/font.rs b/runtime/src/font.rs
index d54eb6a8..75fdfc11 100644
--- a/runtime/src/font.rs
+++ b/runtime/src/font.rs
@@ -1,5 +1,6 @@
//! Load and use fonts.
-use crate::{Action, Task};
+use crate::task::{self, Task};
+use crate::Action;
use std::borrow::Cow;
/// An error while loading a font.
@@ -8,7 +9,7 @@ pub enum Error {}
/// Load a font from its bytes.
pub fn load(bytes: impl Into<Cow<'static, [u8]>>) -> Task<Result<(), Error>> {
- Task::oneshot(|channel| Action::LoadFont {
+ task::oneshot(|channel| Action::LoadFont {
bytes: bytes.into(),
channel,
})