Don't reexport Source

main
Laurent Pelecq 2 years ago
parent 7c8874237d
commit c0f0b69dd8

@ -7,13 +7,14 @@
// option. All files in the project carrying such notice may not be copied, // option. All files in the project carrying such notice may not be copied,
// modified, or distributed except according to those terms. // modified, or distributed except according to those terms.
use mio::event::Source;
use std::collections::VecDeque; use std::collections::VecDeque;
use std::io::{self, Read, Write}; use std::io::{self, Read, Write};
use crate::{ use crate::{
client::{Client, ClientError, ClientName, ClientResult}, client::{Client, ClientError, ClientName, ClientResult},
constants::*, constants::*,
types::{EventId, Source, SynthesisVoice}, types::{EventId, SynthesisVoice},
}; };
#[derive(Debug)] #[derive(Debug)]

@ -15,9 +15,16 @@ use crate::constants::*;
use crate::protocol::{send_lines, write_lines}; use crate::protocol::{send_lines, write_lines};
use crate::types::{ use crate::types::{
CapitalLettersRecognitionMode, ClientScope, Event, KeyName, MessageId, MessageScope, CapitalLettersRecognitionMode, ClientScope, Event, KeyName, MessageId, MessageScope,
NotificationType, Priority, PunctuationMode, ReturnCode, Source, StatusLine, SynthesisVoice, NotificationType, Priority, PunctuationMode, ReturnCode, StatusLine, SynthesisVoice,
}; };
// Trick to have common implementation for std and mio streams..
#[cfg(not(feature = "async-mio"))]
use std::fmt::Debug as Source;
#[cfg(feature = "async-mio")]
use mio::event::Source;
/// Client error, either I/O error or SSIP error. /// Client error, either I/O error or SSIP error.
#[derive(ThisError, Debug)] #[derive(ThisError, Debug)]
pub enum ClientError { pub enum ClientError {

@ -378,13 +378,6 @@ impl fmt::Display for StatusLine {
} }
} }
#[cfg(not(feature = "async-mio"))]
// Trick to have common implementation for std and mio streams..
pub use std::fmt::Debug as Source;
#[cfg(feature = "async-mio")]
pub use mio::event::Source;
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {

Loading…
Cancel
Save