diff options
author | Joe Wilm <joe@jwilm.com> | 2016-02-25 21:02:18 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-02-25 21:02:18 -0800 |
commit | ce96b5df6bcbb41ba9e91f52b1d88f6e28de48df (patch) | |
tree | 40bfc9806487102b8f975dfc8966ed98dcc40f86 | |
parent | 07640b392c3377d352b12927fa88afac0b3768b6 (diff) | |
download | alacritty-ce96b5df6bcbb41ba9e91f52b1d88f6e28de48df.tar.gz alacritty-ce96b5df6bcbb41ba9e91f52b1d88f6e28de48df.zip |
Fix some compiler warnings
-rw-r--r-- | src/main.rs | 10 | ||||
-rw-r--r-- | src/text.rs | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs index 69e4ca6c..4ef326ac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,8 +17,8 @@ fn main() { let window = glutin::Window::new().unwrap(); let (width, height) = window.get_inner_size_pixels().unwrap(); unsafe { - window.make_current() - }; + window.make_current().unwrap(); + } unsafe { gl::load_with(|symbol| window.get_proc_address(symbol) as *const _); @@ -27,7 +27,7 @@ fn main() { let rasterizer = text::Rasterizer::new(); - let glyph_R = Glyph::new(&rasterizer.get_glyph(180., 'R')); + let glyph_r = Glyph::new(&rasterizer.get_glyph(180., 'R')); let glyph_u = Glyph::new(&rasterizer.get_glyph(180., 'u')); let glyph_s = Glyph::new(&rasterizer.get_glyph(180., 's')); let glyph_t = Glyph::new(&rasterizer.get_glyph(180., 't')); @@ -46,12 +46,12 @@ fn main() { gl::Clear(gl::COLOR_BUFFER_BIT); } - renderer.render(&glyph_R, 10.0, 10.0); + renderer.render(&glyph_r, 10.0, 10.0); renderer.render(&glyph_u, 130.0, 10.0); renderer.render(&glyph_s, 250.0, 10.0); renderer.render(&glyph_t, 370.0, 10.0); - window.swap_buffers(); + window.swap_buffers().unwrap(); match event { glutin::Event::Closed => break, diff --git a/src/text.rs b/src/text.rs index 14a0cfb7..af40705f 100644 --- a/src/text.rs +++ b/src/text.rs @@ -7,7 +7,7 @@ use freetype; /// Rasterizes glyphs for a single font face. pub struct Rasterizer { face: Face<'static>, - library: Library, + _library: Library, } #[inline] @@ -28,7 +28,7 @@ impl Rasterizer { Rasterizer { face: library.new_face(path, 0).expect("Create font face"), - library: library, + _library: library, } } |