Open ExceptionallyHandsome opened 3 years ago
Just saw this:
is TorrentFile really supposed be public? I just see all its methods are pub and have detailed doc comments, but the struct itself is pub(crate)
It's not! I try to document everything as nicely as possible though, especially more complicated things. As noted above though, no intentions of making the type public.
It's not! I try to document everything as nicely as possible though, especially more complicated things. As noted above though, no intentions of making the type public.
Then do you mind if I make the methods pub(crate)
instead of pub
? It's kinda confusing.
@ExceptionallyHandsome I thought it was sufficient to make a type's visibility restricted without having to alter its methods' visibility, but I wasn't sure what is actually good practice in this case as I haven't found much online. Do you perhaps know?
Arguably being explicit is better so I don't actually mind.
Hi @ExceptionallyHandsome, how have you been doing?
I've been very busy and haven't had a lot of time to put more thought into this MR. Do you plan to continue it at some point? I plan to recommence developmenet of cratetorrent in the coming weeks, I just have a few more priorities to attend to first.
No rush, and absolutely no problem if you don't want to pick this up. I'm just inquiring, I understand what it's like to be busy after all. :)
Hey everybody, I'm new to this project and noticed that it can't be built on Mac due to the use ofpreadv
and pwritev
, which doesn't exist for darwin. Is this the intent to fix this issue and if so, is there any chance there will be progress on that matter ?
Closes #88
I had to implement
read_exact_at/write_all_at
, and guess what? There's no cross platform API forread_at/write_at
! For good reason: Unix API does not affect "seek cursor", while other's do. I don't think we care since we always specify the offset explicitly, but perhaps it's undesirable? Need your input, but I think we can live with that.There are couple of code pieces gated under
cfg
which is quite ugly, but all attempts at factoring these pieces out resulted in pretentious versions of roughly the same code, so I decided this is good enough. Suggestions are welcome.Overall, this is roughly the "working" version. "Working" because I haven't had a chance to test it. I'll proceed to it in two-three days (busy days, sorry), so this is just me presenting the design for your judgement.
(and a somewhat unrelated question: is
TorrentFile
really supposed be public? I just see all its methods arepub
and have detailed doc comments, but the struct itself ispub(crate)
)