Skip to content

Commit

Permalink
Use no macros
Browse files Browse the repository at this point in the history
  • Loading branch information
carbotaniuman committed Jul 15, 2022
1 parent 980f477 commit 7b9e0e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions c-scape/src/fs/utime.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use core::ffi::CStr;
use core::ptr;
use rustix::fd::BorrowedFd;
use rustix::fs::{AtFlags, UTIME_NOW, Timestamps};
use rustix::fs::{AtFlags, Timestamps, UTIME_NOW};
use rustix::time::Timespec;

use libc::{c_char, c_int};
Expand Down Expand Up @@ -56,7 +56,8 @@ unsafe extern "C" fn utimensat(
libc!(libc::utimensat(fd, path, times, flag));

let times = times as *const [libc::timespec; 2];
let flags = some_or_ret_einval!(AtFlags::from_bits(flag as _));
// let flags = some_or_ret_einval!(AtFlags::from_bits(flag as _));
let flags = AtFlags::from_bits(flag as _).unwrap();

match convert_res(rustix::fs::utimensat(
BorrowedFd::borrow_raw(fd),
Expand Down
4 changes: 2 additions & 2 deletions c-scape/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ extern crate compiler_builtins;
// crate in place of libc.
pub use libc::*;

#[macro_use]
mod err_check;
// #[macro_use]
// mod err_check;
#[macro_use]
mod use_libc;

Expand Down

0 comments on commit 7b9e0e2

Please sign in to comment.