mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 05:38:19 +00:00
cargo clippy --fix
This commit is contained in:
@@ -15,8 +15,6 @@ use std::convert::TryInto;
|
||||
use std::ffi::CStr;
|
||||
use std::os::raw::c_char;
|
||||
use std::slice;
|
||||
#[cfg(feature = "pirita_file")]
|
||||
use wasmer_api::{AsStoreMut, Imports, Module};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::{
|
||||
convert::TryFrom,
|
||||
@@ -25,6 +23,8 @@ use std::{
|
||||
io::{self, SeekFrom},
|
||||
sync::MutexGuard,
|
||||
};
|
||||
#[cfg(feature = "pirita_file")]
|
||||
use wasmer_api::{AsStoreMut, Imports, Module};
|
||||
use wasmer_wasi::{
|
||||
get_wasi_version, FsError, VirtualFile, WasiBidirectionalPipePair, WasiFile, WasiFunctionEnv,
|
||||
WasiPipe, WasiState, WasiStateBuilder, WasiVersion,
|
||||
@@ -521,7 +521,7 @@ fn test_wasi_pipe_with_destructor() {
|
||||
let wasi_pipe_t_ptr = unsafe { &mut *wasi_pipe_t_ptr };
|
||||
let second_wasi_pipe_t_ptr = unsafe { &mut *second_wasi_pipe_t_ptr };
|
||||
|
||||
let data = b"hello".into_iter().map(|v| *v as i8).collect::<Vec<_>>();
|
||||
let data = b"hello".iter().map(|v| *v as i8).collect::<Vec<_>>();
|
||||
let result = unsafe { wasi_pipe_write_bytes(wasi_pipe_t_ptr, data.as_ptr(), data.len()) };
|
||||
assert_eq!(result, 5);
|
||||
|
||||
@@ -816,7 +816,6 @@ pub unsafe extern "C" fn wasi_config_overwrite_stderr(
|
||||
.stderr(Box::from_raw(stderr_overwrite));
|
||||
}
|
||||
|
||||
|
||||
#[repr(C)]
|
||||
pub struct wasi_filesystem_t {
|
||||
ptr: *const c_char,
|
||||
|
||||
Reference in New Issue
Block a user