Skip to content

Commit

Permalink
lua: import from core over std where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
noib3 committed Oct 1, 2024
1 parent 3ff1363 commit 6a97c15
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion crates/luajit/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::ffi::c_int;
use core::ffi::c_int;

use thiserror::Error as ThisError;

Expand Down
4 changes: 2 additions & 2 deletions crates/luajit/src/ffi.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(non_snake_case)]

use std::ffi::{c_char, c_double, c_int, c_void};
use std::marker::{PhantomData, PhantomPinned};
use core::ffi::{c_char, c_double, c_int, c_void};
use core::marker::{PhantomData, PhantomPinned};

#[repr(C)]
pub struct State {
Expand Down
8 changes: 4 additions & 4 deletions crates/luajit/src/function.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::error::Error;
use std::ffi::{c_int, CStr};
use std::mem;
use std::ptr;
use core::error::Error;
use core::ffi::{c_int, CStr};
use core::mem;
use core::ptr;

use crate::ffi::{self, State};
use crate::{utils, IntoResult, Poppable, Pushable};
Expand Down
2 changes: 1 addition & 1 deletion crates/luajit/src/macros.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::ffi::c_char;
use core::ffi::c_char;

use crate::ffi::*;

Expand Down
2 changes: 1 addition & 1 deletion crates/luajit/src/poppable.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use core::hash::Hash;
use std::collections::HashMap;
use std::hash::Hash;

use crate::ffi::*;
use crate::macros::count;
Expand Down
2 changes: 1 addition & 1 deletion crates/luajit/src/pushable.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::ffi::{c_char, c_int};
use core::ffi::{c_char, c_int};

use crate::ffi::{self, Integer, Number, State};
use crate::macros::count;
Expand Down
4 changes: 2 additions & 2 deletions crates/luajit/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::ffi::{c_int, CStr};
use std::fmt::Display;
use core::ffi::{c_int, CStr};
use core::fmt::Display;

use crate::ffi::{self, State};

Expand Down

0 comments on commit 6a97c15

Please sign in to comment.