Skip to content

Commit f13fe7d

Browse files
committed
Remove unsafe
1 parent d795b07 commit f13fe7d

File tree

1 file changed

+6
-8
lines changed
  • src/unix/bsd/netbsdlike/openbsdlike/openbsd

1 file changed

+6
-8
lines changed

src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,10 @@ cfg_if! {
146146
if #[cfg(feature = "extra_traits")] {
147147
impl PartialEq for mount_info {
148148
fn eq(&self, other: &mount_info) -> bool {
149-
unsafe {
150-
self.align
151-
.iter()
152-
.zip(other.align.iter())
153-
.all(|(a,b)| a == b)
154-
}
149+
self.align
150+
.iter()
151+
.zip(other.align.iter())
152+
.all(|(a,b)| a == b)
155153
}
156154
}
157155

@@ -160,14 +158,14 @@ cfg_if! {
160158
impl ::fmt::Debug for mount_info {
161159
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
162160
f.debug_struct("mount_info")
163-
// FIXME: .field("align", &self.align)
161+
// FIXME: .field("align", &self.align)
164162
.finish()
165163
}
166164
}
167165

168166
impl ::hash::Hash for mount_info {
169167
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
170-
unsafe { self.align.hash(state) };
168+
self.align.hash(state);
171169
}
172170
}
173171
}

0 commit comments

Comments
 (0)