summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-01-31 15:05:42 +0100
committerLaurenz <laurmaedje@gmail.com>2023-01-31 15:05:42 +0100
commitec05ed7e0646d1e8ff76677d0332ddf93ed57b69 (patch)
tree75f57cbc2380591ef6c4f30d71e018e3cd001e19 /src/lib.rs
parent9a99beec94a5b02aa91a363b299d4795ef52c0fa (diff)
Move assets
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 4d4cbb8b..0dc42152 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -75,7 +75,11 @@ pub fn compile(world: &(dyn World + 'static), source: &Source) -> SourceResult<D
#[comemo::track]
pub trait World {
/// The path relative to which absolute paths are.
- fn root(&self) -> &Path;
+ ///
+ /// Defaults to the empty path.
+ fn root(&self) -> &Path {
+ Path::new("")
+ }
/// The standard library.
fn library(&self) -> &Prehashed<Library>;