Stebalien / tempfile

Temporary file library for rust
http://stebalien.com/projects/tempfile-rs
Apache License 2.0
1.2k stars 120 forks source link

fix(docs): Change `dir` and `file` variable names ... #237

Closed LeoniePhiline closed 1 year ago

LeoniePhiline commented 1 year ago

fix(docs): Change dir and file variable names in tempdir and tempdir_in documentation

to match existing comments and rest of module

Problem statement

The documentation for tempdir and tempdir_in use variables dir and file but refer to them as tmp_dir and tmp_file in code comments.

Discussion

The comments could be changed to refer to dir and file. However, the rest of the module uses tmp_dir and tmp_file.

PR changes

The variable names were changed.

This way, they match the comments referring to these variables as well as the rest of the module documentation.

Tests

Existing doctests succeed.

test src/dir.rs - dir::tempdir (line 36) ... ok
test src/dir.rs - dir::tempdir_in (line 85) ... ok
LeoniePhiline commented 1 year ago

It's not a big deal - it's just correcting something that's wrong.

Even if it being wrong does no further harm than to trip the occasional reader's brain for a second.

Sometimes it's the small things. ;)

Stebalien commented 1 year ago

No, thank you. It does make for cleaner docs.