This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro_rules! glcheck( | |
($e:expr) => ( | |
let result = $e; | |
let err = gl::get_error(); | |
if (err != gl::NO_ERROR) { | |
fail!(gl_error_to_str(err)); | |
} | |
result | |
) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn new_foo(a: &Path) -> Result<~Foo, ~str> { | |
// any way to flatten this? | |
do read_whole_file(a).map_move |b| { | |
do frob(b).map_move |c| { | |
do baz(c).map_move |d| { | |
~Foo { bar: d } | |
} | |
} | |
} | |
} |