Skip to content

Commit

Permalink
Rollup merge of rust-lang#93635 - GuillaumeGomez:missing-platform-spe…
Browse files Browse the repository at this point in the history
…c-info, r=Amanieu

Add missing platform-specific information on current_dir and set_current_dir

Fixes rust-lang#93598.
  • Loading branch information
matthiaskrgr authored Feb 11, 2022
2 parents a72c0e1 + 22a24c9 commit a023e7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions library/std/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ use crate::sys::os as os_imp;

/// Returns the current working directory as a [`PathBuf`].
///
/// # Platform-specific behavior
///
/// This function currently corresponds to the `getcwd` function on Unix
/// and the `GetCurrentDirectoryW` function on Windows.
///
/// # Errors
///
/// Returns an [`Err`] if the current working directory value is invalid.
Expand All @@ -49,6 +54,11 @@ pub fn current_dir() -> io::Result<PathBuf> {

/// Changes the current working directory to the specified path.
///
/// # Platform-specific behavior
///
/// This function currently corresponds to the `chdir` function on Unix
/// and the `SetCurrentDirectoryW` function on Windows.
///
/// Returns an [`Err`] if the operation fails.
///
/// # Examples
Expand Down

0 comments on commit a023e7b

Please sign in to comment.