Commit 9f575a7
authored
Rollup merge of rust-lang#73243 - poliorcetics:discourage-is-file, r=Amanieu
Add documentation to point to `File::open` or `OpenOptions::open` instead of `is_file` to check read/write possibility
Fixes rust-lang#64170.
This adds documentation to point user towards `!is_dir` instead of `is_file` when all they want to is read from a source.
I ran `rg "fn is_file\("` to find all `is_file` methods, I hope I did not miss one.2 files changed
+30
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
1036 | 1042 | | |
1037 | 1043 | | |
| 1044 | + | |
| 1045 | + | |
1038 | 1046 | | |
1039 | 1047 | | |
1040 | 1048 | | |
| |||
1307 | 1315 | | |
1308 | 1316 | | |
1309 | 1317 | | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1310 | 1324 | | |
1311 | 1325 | | |
| 1326 | + | |
| 1327 | + | |
1312 | 1328 | | |
1313 | 1329 | | |
1314 | 1330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2503 | 2503 | | |
2504 | 2504 | | |
2505 | 2505 | | |
2506 | | - | |
2507 | | - | |
2508 | | - | |
2509 | | - | |
2510 | | - | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
2511 | 2520 | | |
2512 | 2521 | | |
2513 | 2522 | | |
| |||
0 commit comments