Commit a13ece2d authored by Ticki's avatar Ticki
Browse files

Remove all warnings in liborbital, use #[deny(warnings)]

parent c8c448fc
......@@ -34,7 +34,7 @@ impl BmpFile {
pub fn from_path(path: &str) -> Self {
let mut data: Vec<u8> = Vec::new();
if let Ok(mut file) = File::open(path) {
file.read_to_end(&mut data);
let _ = file.read_to_end(&mut data); // TODO handle error case
}
Self::from_data(&data)
}
......
......@@ -2,6 +2,8 @@
#![feature(associated_consts)]
#![feature(box_syntax)]
#![deny(warnings)]
extern crate core;
pub use bmp::BmpFile;
......
......@@ -33,7 +33,7 @@ impl Window {
pub fn new(x: i32, y: i32, w: u32, h: u32, title: &str) -> Option<Box<Self>> {
let mut font = Vec::new();
if let Ok(mut font_file) = File::open("file:/ui/unifont.font") {
font_file.read_to_end(&mut font);
let _ = font_file.read_to_end(&mut font);
}
match File::open(&format!("orbital:///{}/{}/{}/{}/{}", x, y, w, h, title)) {
......@@ -190,8 +190,8 @@ impl Window {
/// Flip the window buffer
pub fn sync(&mut self) -> bool {
self.file.seek(SeekFrom::Start(0));
self.file.write(&unsafe {
let _ = self.file.seek(SeekFrom::Start(0));
let _ = self.file.write(&unsafe {
slice::from_raw_parts(self.data.as_ptr() as *const u8,
self.data.len() * mem::size_of::<u32>())
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment