Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
nit, cleanup uses (#7747)
Browse files Browse the repository at this point in the history
automerge
  • Loading branch information
jackcmay authored and solana-grimes committed Jan 10, 2020
1 parent 6da8f49 commit 2d08ddd
Show file tree
Hide file tree
Showing 8 changed files with 769 additions and 284 deletions.
3 changes: 1 addition & 2 deletions programs/bpf_loader/src/alloc.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
14 changes: 8 additions & 6 deletions programs/bpf_loader/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions programs/bpf_loader/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading

0 comments on commit 2d08ddd

Please sign in to comment.