I know I could work around this by setting #[cfg(unix)] on the type declaration, and just declare it twice (one with AsRawFd in the bound, one without). But the amount of duplication that creates is really not worth it for this case. So I'm curious if there's other ways.
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
It means that you can't compile on Windows, the trait doesn't exist there. I would wrap all of those concerns in a module and only compile it on unix and not try to play around with tricks like a stand-in trait.
-
Yes, gotcha. That's what I was afraid of. Thanks for the feedback!
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.