Improve naming in iced_selector crate
This commit is contained in:
parent
59e2687146
commit
299eb54d6f
12 changed files with 235 additions and 219 deletions
|
|
@ -17,7 +17,6 @@ use crate::runtime::task;
|
|||
use crate::runtime::user_interface;
|
||||
use crate::runtime::window;
|
||||
use crate::runtime::{Task, UserInterface};
|
||||
use crate::selector;
|
||||
use crate::{Instruction, Selector};
|
||||
|
||||
use std::fmt;
|
||||
|
|
@ -25,8 +24,8 @@ use std::fmt;
|
|||
/// A headless runtime that can run iced applications and execute
|
||||
/// [instructions](crate::Instruction).
|
||||
///
|
||||
/// An [`Emulator`] runs its program as close as possible to the real thing.
|
||||
/// It will run subscriptions and tasks in the [`Executor`](Program::Executor) of
|
||||
/// An [`Emulator`] runs its program as faithfully as possible to the real thing.
|
||||
/// It will run subscriptions and tasks with the [`Executor`](Program::Executor) of
|
||||
/// the [`Program`].
|
||||
///
|
||||
/// If you want to run a simulation without side effects, use a [`Simulator`](crate::Simulator)
|
||||
|
|
@ -289,7 +288,6 @@ impl<P: Program + 'static> Emulator<P> {
|
|||
let Some(events) = interaction.events(|target| match target {
|
||||
instruction::Target::Point(position) => Some(*position),
|
||||
instruction::Target::Text(text) => {
|
||||
use selector::target::Bounded;
|
||||
use widget::Operation;
|
||||
|
||||
let mut operation = Selector::find(text.as_str());
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ impl fmt::Display for Target {
|
|||
pub enum Keyboard {
|
||||
/// A key was pressed.
|
||||
Press(Key),
|
||||
/// A key was release.
|
||||
/// A key was released.
|
||||
Release(Key),
|
||||
/// A key was "typed" (press and released).
|
||||
Type(Key),
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ use std::path::Path;
|
|||
/// an [`Emulator`] of the given [`Program`](program::Program).
|
||||
///
|
||||
/// Remember that an [`Emulator`] executes the real thing! Side effects _will_
|
||||
/// be performed. It is up to you to ensure your tests have reproducible environments
|
||||
/// take place. It is up to you to ensure your tests have reproducible environments
|
||||
/// by leveraging [`Preset`][program::Preset].
|
||||
pub fn run(
|
||||
program: impl program::Program + 'static,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use crate::core::{Element, Event, Font, Point, Settings, Size, SmolStr};
|
|||
use crate::renderer;
|
||||
use crate::runtime::UserInterface;
|
||||
use crate::runtime::user_interface;
|
||||
use crate::selector::target::Bounded;
|
||||
use crate::selector::Bounded;
|
||||
use crate::{Error, Selector};
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue