diff --git a/embed/src/lib.rs b/embed/src/lib.rs index 4545e00..98610cf 100644 --- a/embed/src/lib.rs +++ b/embed/src/lib.rs @@ -104,12 +104,12 @@ pub struct Dir { impl Dir { /// Returns the children of the directory. - pub fn children(&self) -> &[DirEntry] { + pub fn children(&self) -> &'static [DirEntry] { &self.__children } /// Returns the absolute path of the directory. - pub fn path(&self) -> &Path { + pub fn path(&self) -> &'static Path { Path::new(self.__path.as_ref().into()) } @@ -140,12 +140,12 @@ pub struct File { impl File { /// Returns the content of the file. - pub fn content(&self) -> &[u8] { + pub fn content(&self) -> &'static [u8] { &self.__content } /// Returns the absolute path of the file. - pub fn path(&self) -> &Path { + pub fn path(&self) -> &'static Path { Path::new(self.__path.as_ref().into()) } }