Stebalien / tempfile

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

chore: fix doc url #280

Closed stoeckmann closed 7 months ago

stoeckmann commented 8 months ago

It has to end with version (or latest). Fixes ecb73745c552f9df53f8943ea80e9bebf51643a2.

Just checked. Otherwise the links are broken. Sorry for the second push into the previous branch.

Stebalien commented 8 months ago

Where is this broken? https://docs.rs/tempfile/latest/tempfile works just fine for me.

stoeckmann commented 8 months ago

The automatically generated URLs would point to the wrong locations though, since they append tempfile to the given URL on their own. So it would be https://docs.rs/tempfile/latest/tempfile/tempfile/...

Stebalien commented 8 months ago

Ah, got it.

Stebalien commented 8 months ago

Hm. Actually, do we even need this attribute? I think we can just get rid of the entire doc attribute.

stoeckmann commented 8 months ago

It's not a requirement for tempfile itself, see https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#html_root_url

It helps if someone has tempfile as a dependency and runs cargo doc --no-deps. The generated HTML files link to the tempfile documents at the given root. If no such root is given, no links are created.

So, nothing really bad happens if it's gone.

Stebalien commented 7 months ago

Ok, might as well fix it. Thanks!