We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74c825e commit 4b2f372Copy full SHA for 4b2f372
src/libstd/fs.rs
@@ -417,15 +417,15 @@ Otherwise, homedir returns option::none.
417
fn homedir() -> option<path> {
418
ret alt generic_os::getenv("HOME") {
419
some(p) {
420
- if !str::is_empty(p) {
+ if !str::is_empty(p) {
421
some(p)
422
} else {
423
- secondary()
424
- }
425
426
- none. {
427
428
+ secondary()
+ }
+ none. {
429
};
430
431
#[cfg(target_os = "linux")]
@@ -440,9 +440,9 @@ fn homedir() -> option<path> {
440
option::maybe(none, generic_os::getenv("USERPROFILE")) {|p|
441
if !str::is_empty(p) {
442
443
- } else {
444
- none
445
+ } else {
+ none
446
}
447
448
0 commit comments