thingy/recovered_revisions/src/simple_rs/file.480277053466

35 lines
760 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

use command::{IrcCommand, IrcCommandLine, Numeric, Stringy};
pub struct SimpleIrcCommand {
command: Vec<u8>,
arguments: (Vec<Range<usize>>, Vec<u8>),
source: Vec<u8>,
}
impl IrcCommandLine for SimpleIrcCommand {
fn get_command<'a>(&'a self) -> IrcCommand<'a> {
IrcCommand::new(&self.command)
}
fn get_argument<'a>(&'a self, arg: usize) -> &'a [u8] {
self.arguments.1[self.arguments.0[arg].clone()] // awful API there, rust.
}
fn get_argument_count(&self) -> usize {
self.arguments.0.len()
}
fn get_source(&'a self) -> &'a [u8] {
self.source
}
}
pub struct NoIrcConnection;
impl NoIrcConnection {
fn read_command<R: Read>(reader: R) -> SimpleIrcCommand {
}
}