Incoherent derived traits (#471)

This commit is contained in:
truchi 2020-08-03 08:06:09 +02:00 committed by GitHub
parent 32215ec7f5
commit 0b429e5dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 4 deletions

View File

@ -54,7 +54,7 @@ crossterm_winapi = "0.6.1"
#
[target.'cfg(unix)'.dependencies]
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"] }
#
@ -65,3 +65,14 @@ tokio = { version = "0.2.11", features = ["full"] }
futures = "0.3"
futures-timer = "3.0"
async-std = "1.4"
#
# Examples
#
[[example]]
name = "event-stream-async-std"
required-features = ["event-stream"]
[[example]]
name = "event-stream-tokio"
required-features = ["event-stream"]

View File

@ -377,7 +377,7 @@ impl Command for SetAttributes {
/// # Notes
///
/// 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>);
impl<D> Command for PrintStyledContent<D>

View File

@ -5,7 +5,7 @@ use std::fmt::Display;
use crate::style::{Attribute, Attributes, Color, StyledContent};
/// The style that can be put on content.
#[derive(Debug, Clone, Default)]
#[derive(Debug, Copy, Clone, Default)]
pub struct ContentStyle {
/// The foreground color.
pub foreground_color: Option<Color>,

View File

@ -27,7 +27,7 @@ use crate::{
///
/// println!("{}", styled);
/// ```
#[derive(Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pub struct StyledContent<D: Display> {
/// The style (colors, content attributes).
style: ContentStyle,