Hide internal Task constructors

This commit is contained in:
Héctor Ramón Jiménez 2024-07-05 01:13:28 +02:00
parent 2b19471d1c
commit 88611d7653
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
11 changed files with 140 additions and 136 deletions

View file

@ -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,
})