Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6913b31

Browse files
committedMar 12, 2021
moving trait impls before constants
1 parent 101789b commit 6913b31

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed
 

‎src/unix/mod.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,29 @@ s! {
207207
}
208208
}
209209

210+
cfg_if! {
211+
if #[cfg(feature = "extra_traits")] {
212+
impl PartialEq for __c_anonymous_sigaction_handler {
213+
fn eq(&self, other: &__c_anonymous_sigaction_handler) -> bool {
214+
unsafe { self.default == other.default }
215+
}
216+
}
217+
impl Eq for __c_anonymous_sigaction_handler {}
218+
impl ::fmt::Debug for __c_anonymous_sigaction_handler {
219+
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
220+
f.debug_struct("sigaction_t")
221+
.field("value", unsafe { &self.default } )
222+
.finish()
223+
}
224+
}
225+
impl ::hash::Hash for __c_anonymous_sigaction_handler {
226+
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
227+
unsafe { self.default.hash(state) };
228+
}
229+
}
230+
}
231+
}
232+
210233
pub const INT_MIN: c_int = -2147483648;
211234
pub const INT_MAX: c_int = 2147483647;
212235

@@ -1724,26 +1747,3 @@ cfg_if! {
17241747
pub use self::no_align::*;
17251748
}
17261749
}
1727-
1728-
cfg_if! {
1729-
if #[cfg(feature = "extra_traits")] {
1730-
impl PartialEq for __c_anonymous_sigaction_handler {
1731-
fn eq(&self, other: &__c_anonymous_sigaction_handler) -> bool {
1732-
unsafe { self.default == other.default }
1733-
}
1734-
}
1735-
impl Eq for __c_anonymous_sigaction_handler {}
1736-
impl ::fmt::Debug for __c_anonymous_sigaction_handler {
1737-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
1738-
f.debug_struct("sigaction_t")
1739-
.field("value", unsafe { &self.default } )
1740-
.finish()
1741-
}
1742-
}
1743-
impl ::hash::Hash for __c_anonymous_sigaction_handler {
1744-
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
1745-
unsafe { self.default.hash(state) };
1746-
}
1747-
}
1748-
}
1749-
}

0 commit comments

Comments
 (0)
Please sign in to comment.