diff options
author | Joe Wilm <joe@jwilm.com> | 2016-12-09 21:10:49 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-12-11 20:23:41 -0800 |
commit | 4ba29314375337c7c4deca01b06450dbccfc0289 (patch) | |
tree | 373cdc4c82270164934e00427f19b0d2ff963cce /src/macros.rs | |
parent | 093ac43f806d4321674888a7cd48d4c2ecdfa7bf (diff) | |
download | alacritty-4ba29314375337c7c4deca01b06450dbccfc0289.tar.gz alacritty-4ba29314375337c7c4deca01b06450dbccfc0289.zip |
Cleaning up main; Added window module
Adds a wrapper for the glutin::Window which provides strongly typed
APIs and more convenient interfaces. Moves some gl calls into the
opengl-based renderer.
The point of most of the changes here is to clean up main().
Diffstat (limited to 'src/macros.rs')
-rw-r--r-- | src/macros.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/macros.rs b/src/macros.rs index eb37d4db..740e5ed9 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -48,3 +48,12 @@ macro_rules! debug_print { } } +#[macro_export] +macro_rules! maybe { + ($option:expr) => { + match $option { + Some(value) => value, + None => return None, + } + } +} |