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

@ -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"]

View File

@ -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>

View File

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

View File

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