Skip to content
Snippets Groups Projects
Commit 706ae7e1 authored by koenigl's avatar koenigl
Browse files

cargo fmt

parent dd4e1faf
No related branches found
No related tags found
No related merge requests found
use libc; use libc;
use libc::{__errno_location}; use libc::__errno_location;
use libc::{c_char, c_int, c_void, size_t, ssize_t}; use libc::{c_char, c_int, c_void, size_t, ssize_t};
use std::str;
use std::ffi::CStr; use std::ffi::CStr;
use std::str;
/// Get error message string /// Get error message string
/// ///
...@@ -64,7 +64,6 @@ pub fn perror(s: &str) { ...@@ -64,7 +64,6 @@ pub fn perror(s: &str) {
eprintln!("{}: {}", s, strerror(errnum)); eprintln!("{}: {}", s, strerror(errnum));
} }
/// Get error return value /// Get error return value
/// ///
/// The function `get_errno` gets the current global error number `errno`, used /// The function `get_errno` gets the current global error number `errno`, used
...@@ -226,8 +225,6 @@ pub fn write(fildes: c_int, buf: &[c_char], nbyte: size_t) -> ssize_t { ...@@ -226,8 +225,6 @@ pub fn write(fildes: c_int, buf: &[c_char], nbyte: size_t) -> ssize_t {
return unsafe { libc::write(fildes, buf, nbyte) }; return unsafe { libc::write(fildes, buf, nbyte) };
} }
/// Open file /// Open file
/// ///
/// The `open()` function creates a connection between a file named by the /// The `open()` function creates a connection between a file named by the
...@@ -301,7 +298,6 @@ pub fn open(path: &str, oflag: c_int) -> c_int { ...@@ -301,7 +298,6 @@ pub fn open(path: &str, oflag: c_int) -> c_int {
// return unsafe { libc::open(path, oflag, mode) }; // return unsafe { libc::open(path, oflag, mode) };
//} //}
/// Close a file descriptor /// Close a file descriptor
/// ///
/// The `close()` function shall deallocate the file descriptor `fildes`. /// The `close()` function shall deallocate the file descriptor `fildes`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment