Removed lifetime requirements from send_samode.
This commit is contained in:
parent
039049ab32
commit
25532d145e
1 changed files with 6 additions and 2 deletions
|
@ -73,8 +73,12 @@ impl<'a, T, U> Wrapper<'a, T, U> where T: IrcWriter, U: IrcReader {
|
||||||
|
|
||||||
/// Changes the mode of the target
|
/// Changes the mode of the target
|
||||||
#[experimental]
|
#[experimental]
|
||||||
pub fn send_samode(&self, target: &'a str, mode: &'a str, modeparams: Option<&'a str>) -> IoResult<()> {
|
pub fn send_samode(&self, target: &str, mode: &str, modeparams: &str) -> IoResult<()> {
|
||||||
self.server.send(SAMODE(target, mode, modeparams))
|
self.server.send(SAMODE(target, mode, if modeparams.len() == 0 {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
Some(modeparams)
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Forces a user to change from the old nickname to the new nickname
|
/// Forces a user to change from the old nickname to the new nickname
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue