Skip to content

Commit

Permalink
fixup! Port std library to RTEMS
Browse files Browse the repository at this point in the history
  • Loading branch information
thesummer committed Jul 1, 2024
1 parent 598162a commit bbecec5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
36 changes: 18 additions & 18 deletions library/std/src/os/rtems/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ pub trait MetadataExt {
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
/// cross-Unix abstractions contained within the raw stat.
///
/// [`stat`]: crate::os::redox::raw::stat
/// [`stat`]: crate::os::rtems::raw::stat
///
/// # Examples
///
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -49,7 +49,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -66,7 +66,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -83,7 +83,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -100,7 +100,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -117,7 +117,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -134,7 +134,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -151,7 +151,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -171,7 +171,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -188,7 +188,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -207,7 +207,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -224,7 +224,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -243,7 +243,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -260,7 +260,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -279,7 +279,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -296,7 +296,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand All @@ -313,7 +313,7 @@ pub trait MetadataExt {
/// ```no_run
/// use std::fs;
/// use std::io;
/// use std::os::redox::fs::MetadataExt;
/// use std::os::rtems::fs::MetadataExt;
///
/// fn main() -> io::Result<()> {
/// let meta = fs::metadata("some_file")?;
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ impl FileAttr {
target_os = "vxworks",
target_os = "espidf",
target_os = "vita",
target_os = "rtems"
target_os = "rtems",
))]
pub fn modified(&self) -> io::Result<SystemTime> {
SystemTime::new(self.stat.st_mtime as i64, 0)
Expand Down

0 comments on commit bbecec5

Please sign in to comment.