]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #104298 - tbu-:pr_set_extension_caveats, r=m-ou-se
authorMichael Goulet <michael@errs.io>
Mon, 2 Jan 2023 23:39:16 +0000 (15:39 -0800)
committerGitHub <noreply@github.com>
Mon, 2 Jan 2023 23:39:16 +0000 (15:39 -0800)
Add notes and examples about non-intuitive `PathBuf::set_extension` behavior

Basically, passing the empty string will actually remove the extension instead of setting it to the empty string. This might change what is considered to be an extension. Additionally, passing an extension that contains dots will make the path only consider the last part of it to be the new extension.

1  2 
library/std/src/path.rs

Simple merge