hannobraun / inotify-rs

Idiomatic inotify wrapper for the Rust programming language
ISC License
254 stars 64 forks source link

docs.rs links from inotify to inotify_sys are broken #212

Closed eric-seppanen closed 7 months ago

eric-seppanen commented 7 months ago

The docs for each of the WatchMask and EventMask variants try to link to the docs.rs page for inotify_sys, but the links are all broken.

For example: https://docs.rs/inotify/latest/inotify_sys/constant.IN_ACCESS.html is 404.

It should be: https://docs.rs/inotify-sys/latest/inotify_sys/constant.IN_ACCESS.html

hannobraun commented 7 months ago

Thanks for opening this issue, @eric-seppanen! I don't think I can get to this any time soon, but I'd be happy to merge a pull request that fixes this.

eric-seppanen commented 7 months ago

I think that this can be fixed by using the "by name" link style. This emits an identical-looking page, and the links work locally. As I can tell from reading github issues it will also work on docs.rs.

Would this style be acceptable?

        /// File was accessed
        ///
        /// When watching a directory, this event is only triggered for objects
        /// inside the directory, not the directory itself.
        ///
        /// See [`inotify_sys::IN_ACCESS`].
        const ACCESS = ffi::IN_ACCESS;
eric-seppanen commented 7 months ago

I notice there are a lot of places where the docs unnecessarily specify html paths to other items. I think this hasn't been necessary since Rust 1.48, so it would be straightforward to do a cleanup pass removing things like

/// [`WatchMask`]: struct.WatchMask.html

... as long as the symbol is in scope.

hannobraun commented 7 months ago

Thanks for looking into this, @eric-seppanen!

Would this style be acceptable?

Absolutely.

I notice there are a lot of places where the docs unnecessarily specify html paths to other items. I think this hasn't been necessary since Rust 1.48

This crate is old :joy:

First commit in April 2014, so almost 10 years!


I just saw, after writing this, that you also submitted a pull request. Looking into it now!