Incoherent derived traits (#471)
This commit is contained in:
parent
32215ec7f5
commit
0b429e5dcf
13
Cargo.toml
13
Cargo.toml
@ -54,7 +54,7 @@ crossterm_winapi = "0.6.1"
|
|||||||
#
|
#
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
mio = {version="0.7", features=["os-poll"]}
|
mio = { version="0.7", features=["os-poll"] }
|
||||||
signal-hook = { version = "0.1.15", features = ["mio-0_7-support"] }
|
signal-hook = { version = "0.1.15", features = ["mio-0_7-support"] }
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -65,3 +65,14 @@ tokio = { version = "0.2.11", features = ["full"] }
|
|||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
futures-timer = "3.0"
|
futures-timer = "3.0"
|
||||||
async-std = "1.4"
|
async-std = "1.4"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Examples
|
||||||
|
#
|
||||||
|
[[example]]
|
||||||
|
name = "event-stream-async-std"
|
||||||
|
required-features = ["event-stream"]
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "event-stream-tokio"
|
||||||
|
required-features = ["event-stream"]
|
||||||
|
@ -377,7 +377,7 @@ impl Command for SetAttributes {
|
|||||||
/// # Notes
|
/// # Notes
|
||||||
///
|
///
|
||||||
/// Commands must be executed/queued for execution otherwise they do nothing.
|
/// Commands must be executed/queued for execution otherwise they do nothing.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct PrintStyledContent<D: Display + Clone>(pub StyledContent<D>);
|
pub struct PrintStyledContent<D: Display + Clone>(pub StyledContent<D>);
|
||||||
|
|
||||||
impl<D> Command for PrintStyledContent<D>
|
impl<D> Command for PrintStyledContent<D>
|
||||||
|
@ -5,7 +5,7 @@ use std::fmt::Display;
|
|||||||
use crate::style::{Attribute, Attributes, Color, StyledContent};
|
use crate::style::{Attribute, Attributes, Color, StyledContent};
|
||||||
|
|
||||||
/// The style that can be put on content.
|
/// The style that can be put on content.
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Copy, Clone, Default)]
|
||||||
pub struct ContentStyle {
|
pub struct ContentStyle {
|
||||||
/// The foreground color.
|
/// The foreground color.
|
||||||
pub foreground_color: Option<Color>,
|
pub foreground_color: Option<Color>,
|
||||||
|
@ -27,7 +27,7 @@ use crate::{
|
|||||||
///
|
///
|
||||||
/// println!("{}", styled);
|
/// println!("{}", styled);
|
||||||
/// ```
|
/// ```
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
pub struct StyledContent<D: Display> {
|
pub struct StyledContent<D: Display> {
|
||||||
/// The style (colors, content attributes).
|
/// The style (colors, content attributes).
|
||||||
style: ContentStyle,
|
style: ContentStyle,
|
||||||
|
Loading…
Reference in New Issue
Block a user