nit, cleanup uses (#7747)

automerge
This commit is contained in:
Jack May
2020-01-09 23:58:13 -08:00
committed by Grimes
parent 6da8f49d8b
commit 2d08dddfc8
8 changed files with 769 additions and 284 deletions

View File

@ -1,5 +1,4 @@
use std::alloc::Layout;
use std::fmt;
use std::{alloc::Layout, fmt};
/// Based loosely on the unstable std::alloc::Alloc trait
pub trait Alloc {

View File

@ -7,12 +7,14 @@ use solana_rbpf::{
memory_region::{translate_addr, MemoryRegion},
EbpfVm,
};
use std::alloc::Layout;
use std::ffi::CStr;
use std::io::{Error, ErrorKind};
use std::mem;
use std::slice::from_raw_parts;
use std::str::from_utf8;
use std::{
alloc::Layout,
ffi::CStr,
io::{Error, ErrorKind},
mem,
slice::from_raw_parts,
str::from_utf8,
};
/// Program heap allocators are intended to allocate/free from a given
/// chunk of memory. The specific allocator implementation is

View File

@ -14,10 +14,11 @@ use solana_sdk::{
pubkey::Pubkey,
sysvar::rent,
};
use std::convert::TryFrom;
use std::io::prelude::*;
use std::io::Error;
use std::mem;
use std::{
convert::TryFrom,
io::{prelude::*, Error},
mem,
};
solana_sdk::declare_program!(
solana_sdk::bpf_loader::ID,