A File is bound to a Module

A File object must be bound to a Module, as one Module owns the File.

This way we can use the Module internally to build the file path later.
This commit is contained in:
Matthias Beyer 2015-11-28 12:44:03 +01:00
parent 0d751f9ffd
commit 593e98ac5d

View file

@ -189,7 +189,7 @@ impl StorageBackend {
* TODO: Needs refactoring, as there might be an error when reading from * TODO: Needs refactoring, as there might be an error when reading from
* disk OR the id just does not exist. * disk OR the id just does not exist.
*/ */
pub fn get_file_by_id<HP>(&self, id: FileID, p: &Parser<HP>) -> Option<File> pub fn get_file_by_id<'a, HP>(&self, m: &'a Module, id: FileID, p: &Parser<HP>) -> Option<File<'a>>
where HP: FileHeaderParser where HP: FileHeaderParser
{ {
debug!("Searching for file with id '{}'", id); debug!("Searching for file with id '{}'", id);