mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #133880 - ChrisDenton:homedir, r=Mark-Simulacrum
Expand home_dir docs Since `home_dir` is set to be undeprecated, let's make the docs a bit more thorough.
This commit is contained in:
@@ -597,6 +597,13 @@ fn description(&self) -> &str {
|
||||
|
||||
/// Returns the path of the current user's home directory if known.
|
||||
///
|
||||
/// This may return `None` if getting the directory fails or if the platform does not have user home directories.
|
||||
///
|
||||
/// For storing user data and configuration it is often preferable to use more specific directories.
|
||||
/// For example, [XDG Base Directories] on Unix or the `LOCALAPPDATA` and `APPDATA` environment variables on Windows.
|
||||
///
|
||||
/// [XDG Base Directories]: https://specifications.freedesktop.org/basedir-spec/latest/
|
||||
///
|
||||
/// # Unix
|
||||
///
|
||||
/// - Returns the value of the 'HOME' environment variable if it is set
|
||||
|
||||
Reference in New Issue
Block a user