Merge pull request #37 from retep998/bunny

Fix #36
This commit is contained in:
Aaron Weiss 2015-10-14 22:10:23 -04:00
commit 40479b4e37
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ use client::data::kinds::{IrcRead, IrcWrite};
pub mod utils;
/// Trait describing core Server functionality.
pub trait Server<'a, T, U> {
pub trait Server<'a, T: IrcRead, U: IrcWrite> {
/// Gets the configuration being used with this Server.
fn config(&self) -> &Config;
/// Sends a Command to this Server.
@ -262,7 +262,7 @@ pub struct ServerIterator<'a, T: IrcRead + 'a, U: IrcWrite + 'a> {
}
/// An Iterator over an IrcServer's incoming Commands.
pub type ServerCmdIterator<'a, T: IrcRead + 'a, U: IrcWrite + 'a> =
pub type ServerCmdIterator<'a, T, U> =
Map<ServerIterator<'a, T, U>, fn(Result<Message>) -> Result<Command>>;
impl<'a, T: IrcRead + 'a, U: IrcWrite + 'a> ServerIterator<'a, T, U> {

View file

@ -10,7 +10,7 @@ use client::data::kinds::{IrcRead, IrcWrite};
use client::server::Server;
/// Extensions for Server capabilities that make it easier to work directly with the protocol.
pub trait ServerExt<'a, T, U>: Server<'a, T, U> {
pub trait ServerExt<'a, T: IrcRead, U: IrcWrite>: Server<'a, T, U> {
/// Sends a request for a list of server capabilities for a specific IRCv3 version.
fn send_cap_ls(&self, version: NegotiationVersion) -> Result<()> where Self: Sized {
self.send(CAP(None, LS, match version {