Hide internal Task constructors
This commit is contained in:
parent
2b19471d1c
commit
88611d7653
11 changed files with 140 additions and 136 deletions
|
|
@ -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,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue