diff options
| author | bors <bors@rust-lang.org> | 2014-01-07 17:56:32 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-07 17:56:32 -0800 |
| commit | a121f7bab3fe21f03cef6e214d5771bfe669e48c (patch) | |
| tree | aae19d70f56d01d89be7ed95a78b494e9f987e6d /src/libstd/path | |
| parent | aa1839bd693176f03f372fb34baa7b19b5030af7 (diff) | |
| parent | 90b394514dad9df9c55b795be724093765d9df3a (diff) | |
| download | rust-a121f7bab3fe21f03cef6e214d5771bfe669e48c.tar.gz rust-a121f7bab3fe21f03cef6e214d5771bfe669e48c.zip | |
auto merge of #10854 : Kimundi/rust/result_compose_map_mutate_or, r=alexcrichton
This implements parts of the changes to `Option` I proposed and discussed in this thread: https://mail.mozilla.org/pipermail/rust-dev/2013-November/006254.html, and on IRC. In short, the string "default" should not be used in any context that has nothing to do with the `std::default::Default` trait. This PR consists of this change: - Renamed `map_default -> map_or` and `mutate_default -> mutate_or_set`.
Diffstat (limited to 'src/libstd/path')
| -rw-r--r-- | src/libstd/path/windows.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index 114f675cdba..913b314c00b 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -255,7 +255,7 @@ impl GenericPathUnsafe for Path { // if me is verbatim, we need to pre-normalize the new path let path_ = if is_verbatim(me) { Path::normalize__(path, None) } else { None }; - let pathlen = path_.as_ref().map_default(path.len(), |p| p.len()); + let pathlen = path_.as_ref().map_or(path.len(), |p| p.len()); let mut s = str::with_capacity(me.repr.len() + 1 + pathlen); s.push_str(me.repr); let plen = me.prefix_len(); |
