minor fixes

This commit is contained in:
CodeSteak 2019-05-05 19:23:10 +02:00
parent 89fa985005
commit 156912d4f6
1 changed files with 2 additions and 3 deletions

View File

@ -133,6 +133,7 @@ impl DataStore {
Ok(file_path.is_file()) Ok(file_path.is_file())
} }
// Todo: this return type looks wrong : ImageError can't happen
pub fn read_texture_file_by_hash(&mut self, hash: &Sha256) -> TextureFileResult { pub fn read_texture_file_by_hash(&mut self, hash: &Sha256) -> TextureFileResult {
use std::fs::*; use std::fs::*;
use std::io::*; use std::io::*;
@ -165,14 +166,12 @@ impl DataStore {
} }
fn flush_metadata(&self) -> io::Result<()> { fn flush_metadata(&self) -> io::Result<()> {
use std::ops::Deref;
let f = metadata_file::MetadataFile::from_iterator(self.textures.iter()); let f = metadata_file::MetadataFile::from_iterator(self.textures.iter());
f.store(self.index_file_path().as_path()) f.store(self.index_file_path().as_path())
} }
pub fn get_texture_preview(&mut self, hash: &Sha256) -> TextureFileResult { pub fn get_texture_preview(&mut self, hash: &Sha256, desired_format : TextureFormat) -> TextureFileResult {
unimplemented!(); unimplemented!();
} }