style: format imports
This commit is contained in:
parent
a48054f1ae
commit
b35efa8f33
69 changed files with 481 additions and 316 deletions
|
|
@ -1,5 +1,7 @@
|
|||
use std::path::{Path, PathBuf};
|
||||
use std::{env, fs};
|
||||
use std::{
|
||||
env, fs,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
fn main() {
|
||||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||
|
|
|
|||
|
|
@ -18,10 +18,11 @@ extern "C" {
|
|||
pub(crate) fn _ts_dup(handle: *mut std::os::raw::c_void) -> std::os::raw::c_int;
|
||||
}
|
||||
|
||||
use std::{marker::PhantomData, mem::ManuallyDrop, ptr::NonNull, str};
|
||||
|
||||
use crate::{
|
||||
Language, LookaheadIterator, Node, Parser, Query, QueryCursor, QueryError, Tree, TreeCursor,
|
||||
};
|
||||
use std::{marker::PhantomData, mem::ManuallyDrop, ptr::NonNull, str};
|
||||
|
||||
impl Language {
|
||||
/// Reconstructs a [`Language`] from a raw pointer.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ mod util;
|
|||
use std::os::unix::io::AsRawFd;
|
||||
#[cfg(windows)]
|
||||
use std::os::windows::io::AsRawHandle;
|
||||
|
||||
use std::{
|
||||
char, error,
|
||||
ffi::CStr,
|
||||
|
|
@ -21,7 +20,6 @@ use std::{
|
|||
ptr::{self, NonNull},
|
||||
slice, str,
|
||||
sync::atomic::AtomicUsize,
|
||||
u16,
|
||||
};
|
||||
|
||||
#[cfg(feature = "wasm")]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
use super::FREE_FN;
|
||||
use std::os::raw::c_void;
|
||||
|
||||
use super::FREE_FN;
|
||||
|
||||
/// A raw pointer and a length, exposed as an iterator.
|
||||
pub struct CBufferIter<T> {
|
||||
ptr: *mut T,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
use crate::{ffi, Language, LanguageError, Parser, FREE_FN};
|
||||
use std::{
|
||||
error,
|
||||
ffi::{CStr, CString},
|
||||
|
|
@ -6,8 +5,11 @@ use std::{
|
|||
mem::{self, MaybeUninit},
|
||||
os::raw::c_char,
|
||||
};
|
||||
|
||||
pub use wasmtime_c_api::wasmtime;
|
||||
|
||||
use crate::{ffi, Language, LanguageError, Parser, FREE_FN};
|
||||
|
||||
// Force Cargo to include wasmtime-c-api as a dependency of this crate,
|
||||
// even though it is only used by the C code.
|
||||
#[allow(unused)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue