-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errno::result() #247
Errno::result() #247
Conversation
69483df
to
cca8a04
Compare
I'm going to take a look at this tomorrow. I also think we'll want input from an extra reviewer or two since it's a major change to the API. |
Well, to be fair the only API change is renaming But yeah, it touches a lot of the codebase! Not sure who else to pull in. |
I thought this was changing the return type of every function in the library from |
No, this doesn't change anything externally (except |
@@ -56,8 +57,6 @@ use std::fmt; | |||
use std::error; | |||
use libc::PATH_MAX; | |||
|
|||
pub type Result<T> = result::Result<T, Error>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My confusion stemmed from moving this into the errno
module. What's the rationale?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it should probably be moved back. Mostly it's there because that's where #230 had it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind moving it back? :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'll do it when I get a chance sometime tomorrow night. Don't let that keep you from reviewing the rest of it though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on what you said, and when I'm more awake, I'm pretty sure this will be fine. I'd been meaning to do a from_ffi
sweep soon, so...
Ah, I was confused. See inline comment #247 (comment) |
Essentially, this is just a PR to change every function to use
|
Thanks for the clarification! |
Moved |
CI failed on apple. Please apply: diff --git a/src/sys/event.rs b/src/sys/event.rs
index eb99f7d..1563a74 100644
--- a/src/sys/event.rs
+++ b/src/sys/event.rs
@@ -1,7 +1,8 @@
/* TOOD: Implement for other kqueue based systems
*/
-use errno::{Errno, Result};
+use Result;
+use errno::Errno;
#[cfg(not(target_os = "netbsd"))]
use libc::{timespec, time_t, c_int, c_long, uintptr_t};
#[cfg(target_os = "netbsd")] :-) |
Ok I'm going over this once more and then let's get the damned thing merged! |
Did a quick review. I'm happy with this change. |
Rebased and merged as 01e8416...f167e8f |
A replacement of
from_ffi
, and updates all methods to use it. Partial preparation for #230 whereError
will be replaced byErrno
.Changes are on top of #246, so merge that first!