Skip to content

Commit 2961997

Browse files
committed
libcore: Remove mutable fields from os and ptr
1 parent b2d1ac1 commit 2961997

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/libcore/os.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,10 @@ pub fn fsync_fd(fd: c_int, _l: io::fsync::Level) -> c_int {
352352
}
353353
}
354354

355-
pub struct Pipe { in: c_int, out: c_int }
355+
pub struct Pipe {
356+
in: c_int,
357+
out: c_int
358+
}
356359

357360
#[cfg(unix)]
358361
pub fn pipe() -> Pipe {

src/libcore/ptr.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@ pub mod ptr_tests {
336336
#[test]
337337
fn test() {
338338
unsafe {
339-
struct Pair {mut fst: int, mut snd: int};
339+
struct Pair {
340+
fst: int,
341+
snd: int
342+
};
340343
let mut p = Pair {fst: 10, snd: 20};
341344
let pptr: *mut Pair = &mut p;
342345
let iptr: *mut int = cast::transmute(pptr);

0 commit comments

Comments
 (0)