diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-20 20:21:56 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-21 11:28:29 +0200 |
| commit | 9488b1b850152eb564dbfefc898c962bdac73eb4 (patch) | |
| tree | 0a99487cddfee1a46b5802dc6b64c81b70e549da /src/loading/mod.rs | |
| parent | 8000783f95ee007d9dda6f1dcc1c42c8e607b122 (diff) | |
Main context struct
Diffstat (limited to 'src/loading/mod.rs')
| -rw-r--r-- | src/loading/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/loading/mod.rs b/src/loading/mod.rs index c2f7ca39..3be74428 100644 --- a/src/loading/mod.rs +++ b/src/loading/mod.rs @@ -21,10 +21,10 @@ pub trait Loader { /// /// This should return the same id for all paths pointing to the same file /// and `None` if the file does not exist. - fn resolve_from(&mut self, base: FileId, path: &Path) -> Option<FileId>; + fn resolve_from(&self, base: FileId, path: &Path) -> Option<FileId>; /// Load a file by id. - fn load_file(&mut self, id: FileId) -> Option<Vec<u8>>; + fn load_file(&self, id: FileId) -> Option<Vec<u8>>; } /// A file id that can be [resolved](Loader::resolve_from) from a path. @@ -53,11 +53,11 @@ impl Loader for BlankLoader { &[] } - fn resolve_from(&mut self, _: FileId, _: &Path) -> Option<FileId> { + fn resolve_from(&self, _: FileId, _: &Path) -> Option<FileId> { None } - fn load_file(&mut self, _: FileId) -> Option<Vec<u8>> { + fn load_file(&self, _: FileId) -> Option<Vec<u8>> { None } } |
