diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-04-09 01:31:23 -0400 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-04-14 01:15:46 -0400 |
| commit | d9595d1737677dd61d9f52f674c34f13d708e39c (patch) | |
| tree | 304855240a098090a217dc325c4ca377b31d9ba2 /src/libcore/sys.rs | |
| parent | 4bfa3c6663ad6facdbdb8bd533442b050085f753 (diff) | |
| download | rust-d9595d1737677dd61d9f52f674c34f13d708e39c.tar.gz rust-d9595d1737677dd61d9f52f674c34f13d708e39c.zip | |
core: remove unnecessary unsafe blocks/functions
Diffstat (limited to 'src/libcore/sys.rs')
| -rw-r--r-- | src/libcore/sys.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libcore/sys.rs b/src/libcore/sys.rs index 52ca0204126..678005ce06f 100644 --- a/src/libcore/sys.rs +++ b/src/libcore/sys.rs @@ -127,10 +127,8 @@ pub fn refcount<T>(t: @T) -> uint { } pub fn log_str<T>(t: &T) -> ~str { - unsafe { - do io::with_str_writer |wr| { - repr::write_repr(wr, t) - } + do io::with_str_writer |wr| { + repr::write_repr(wr, t) } } @@ -157,10 +155,8 @@ pub fn begin_unwind_(msg: *c_char, file: *c_char, line: size_t) -> ! { } pub fn fail_assert(msg: &str, file: &str, line: uint) -> ! { - unsafe { - let (msg, file) = (msg.to_owned(), file.to_owned()); - begin_unwind(~"assertion failed: " + msg, file, line) - } + let (msg, file) = (msg.to_owned(), file.to_owned()); + begin_unwind(~"assertion failed: " + msg, file, line) } #[cfg(test)] |
