From acd8c395f3a214c3ec28d96c494c20f79ba00683 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 7 Feb 2019 12:58:33 +0000 Subject: [PATCH] Tidy up imports --- Cargo.toml | 2 +- src/main/rust/lib.rs | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8c52ef14..3e5cac5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,11 +12,11 @@ publish = false android_logger = "0.6" failure = "0.1" jni = { version = "0.10", default-features = false } +log = "0.4" log-panics = "2.0.0" protobuf = "2" rand = "0.4" rusqlite = { version = "0.15", features = ["bundled"] } -log = "0.4" [dependencies.ff] git = "https://github.com/str4d/librustzcash.git" diff --git a/src/main/rust/lib.rs b/src/main/rust/lib.rs index 7abfeed5..308a043c 100644 --- a/src/main/rust/lib.rs +++ b/src/main/rust/lib.rs @@ -3,7 +3,10 @@ extern crate failure; #[macro_use] extern crate log; +extern crate android_logger; extern crate ff; +extern crate jni; +extern crate log_panics; extern crate pairing; extern crate protobuf; extern crate rusqlite; @@ -16,10 +19,12 @@ mod sql; const SAPLING_CONSENSUS_BRANCH_ID: u32 = 0x76b8_09bb; -extern crate android_logger; -extern crate jni; -extern crate log_panics; - +use android_logger::Filter; +use jni::{ + objects::{JClass, JString}, + sys::{jboolean, jbyteArray, jint, jlong, jobjectArray, jsize, jstring, JNI_FALSE, JNI_TRUE}, + JNIEnv, +}; use log::Level; use std::path::Path; use zcash_client_backend::{ @@ -33,13 +38,6 @@ use zcash_client_backend::{ use zcash_primitives::transaction::components::Amount; use zip32::{ChildIndex, ExtendedFullViewingKey, ExtendedSpendingKey}; -use self::android_logger::Filter; -use self::jni::objects::{JClass, JString}; -use self::jni::sys::{ - jboolean, jbyteArray, jint, jlong, jobjectArray, jsize, jstring, JNI_FALSE, JNI_TRUE, -}; -use self::jni::JNIEnv; - use crate::sql::{ get_address, get_balance, init_accounts_table, init_blocks_table, init_data_database, scan_cached_blocks, send_to_address,