Hugo

Results 1705 comments of Hugo

The UID should not affect the URL on which we request the item. The `href` determines the URL of the item.

I wonder if the slash needs to be escaped here.

I have the impression that the server returns items which contain `/` in the URL. It's possible that the `/` needs to be escaped when requesting these items. This can...

The main reason for `unsafe` blocks are the ffi calls, which are always unsafe, since Rust cannot guarantee memory/type safety for those. Removing `mut` would allow multiple threads/tasks would be...

> Is the current design unsound in some way? Do we need to add a lifetime parameter to Watches, so it is tied to whatever produces it? This can be...

For your proposed change, watches would have a [std::os::fd::BorrowedFd](https://doc.rust-lang.org/std/os/fd/struct.BorrowedFd.html), with a lifetime dependant on the `Inotify` instance. Reading events from the `Inotify` type requires an `&mut`, which can't be taken...

I tried replacing `Arc` with `OwnedFd` for `Inotify` and using `BorrowedFd` for watches and events. The main issue that I'm facing is that the `Iterator` implementation for `Events` needs to...

> Looking at the code in main, isn't all that already the case? We're currently returning data which references the buffer (which outlives the `Events`). Now that you mention it,...

I figured out the issue with the implementation for `Iterator`; I was using `self.fd.as_fd`, which creates a new `BorrowedFd` with a lifetime referencing the `Events` instance. Using `self.fd.clone()` clones the...

> And from my quick reading of the code, it's only used in WatchDescriptor, so the source of an event can be identified? And I think that's also the only...