This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit c7004f9
authored
Rollup merge of rust-lang#104300 - tbu-:pr_path_parent_caveats, r=Mark-Simulacrum
Document `Path::parent` behavior around relative paths
A relative path with just one component will return `Some("")` as its parent, which wasn't clear to me from the documentation.
The parent of `""` is `None`, which was missing from the documentation as well.1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2142 | 2142 | | |
2143 | 2143 | | |
2144 | 2144 | | |
2145 | | - | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
2146 | 2149 | | |
2147 | 2150 | | |
2148 | 2151 | | |
| |||
2156 | 2159 | | |
2157 | 2160 | | |
2158 | 2161 | | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
2159 | 2170 | | |
2160 | 2171 | | |
2161 | 2172 | | |
| |||
0 commit comments