mirror of
https://github.com/RGBCube/embd-rs
synced 2025-07-27 05:27:44 +00:00
Add lifetime annotations
This commit is contained in:
parent
e034144ab6
commit
e3611073b5
1 changed files with 4 additions and 4 deletions
|
@ -104,12 +104,12 @@ pub struct Dir {
|
||||||
|
|
||||||
impl Dir {
|
impl Dir {
|
||||||
/// Returns the children of the directory.
|
/// Returns the children of the directory.
|
||||||
pub fn children(&self) -> &[DirEntry] {
|
pub fn children(&self) -> &'static [DirEntry] {
|
||||||
&self.__children
|
&self.__children
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the absolute path of the directory.
|
/// 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())
|
Path::new(self.__path.as_ref().into())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,12 +140,12 @@ pub struct File {
|
||||||
|
|
||||||
impl File {
|
impl File {
|
||||||
/// Returns the content of the file.
|
/// Returns the content of the file.
|
||||||
pub fn content(&self) -> &[u8] {
|
pub fn content(&self) -> &'static [u8] {
|
||||||
&self.__content
|
&self.__content
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the absolute path of the file.
|
/// 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())
|
Path::new(self.__path.as_ref().into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue