Skip to content

Instantly share code, notes, and snippets.

@mynery
Created October 18, 2013 19:08
Show Gist options
  • Save mynery/7046531 to your computer and use it in GitHub Desktop.
Save mynery/7046531 to your computer and use it in GitHub Desktop.
main.rs:7:1: 7:11 error: type `ui::TBUI` does not implement any method in scope named `run`
main,rs:
pub mod ui;
pub mod level;
fn main() {
let ui = ui::TBUI;
let mut l = level::new();
ui.run(l);
}
ui.rs:
use level;
mod termbox;
pub struct TBUI;
pub trait UI {
fn run(&self, l: level::Level);
fn drawcell(&self, x: int, y: int, ch: char);
fn present(&self);
}
impl UI for TBUI {
fn run(&self, l: level::Level) {
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment