mirror of
https://github.com/jht5945/buildj.git
synced 2025-12-27 17:20:06 +08:00
style: code style
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
use std::{ fs, path::Path, };
|
||||
use std::{ fs, path::Path };
|
||||
use rust_util::{ XResult, new_box_ioerror };
|
||||
|
||||
use rust_util::{
|
||||
iff,
|
||||
XResult,
|
||||
new_box_ioerror,
|
||||
};
|
||||
|
||||
use super::http::get_url_content;
|
||||
use super::misc::VERBOSE;
|
||||
use crate::http::get_url_content;
|
||||
use crate::misc::VERBOSE;
|
||||
|
||||
pub const BUILD_JSON: &str = "build.json";
|
||||
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
use std::fs::File;
|
||||
use rust_util::{ XResult, util_io::copy_io };
|
||||
|
||||
use rust_util::{
|
||||
XResult,
|
||||
util_io::copy_io,
|
||||
};
|
||||
|
||||
use super::misc::VERBOSE;
|
||||
use crate::misc::VERBOSE;
|
||||
|
||||
pub fn download_url(url: &str, dest: &mut File) -> XResult<()> {
|
||||
if *VERBOSE {
|
||||
|
||||
@@ -7,11 +7,7 @@ use std::{
|
||||
process::Command,
|
||||
};
|
||||
use rust_util::util_os::*;
|
||||
use super::{
|
||||
local_util,
|
||||
tool,
|
||||
misc::*,
|
||||
};
|
||||
use crate::{ local_util, tool, misc::* };
|
||||
|
||||
const PATH: &str = "PATH";
|
||||
const JAVA_HOME: &str = "JAVA_HOME";
|
||||
|
||||
@@ -6,18 +6,16 @@ use std::{
|
||||
process::Command,
|
||||
time::SystemTime,
|
||||
};
|
||||
|
||||
use rust_util::{
|
||||
XResult,
|
||||
new_box_ioerror,
|
||||
util_io::*,
|
||||
};
|
||||
|
||||
use crypto::{
|
||||
digest::Digest,
|
||||
md5::Md5,
|
||||
sha1::Sha1,
|
||||
sha2::{Sha256, Sha512},
|
||||
sha2::{ Sha256, Sha512 },
|
||||
};
|
||||
|
||||
pub fn get_args_as_vec() -> Vec<String> {
|
||||
|
||||
@@ -24,9 +24,9 @@ use jdk::*;
|
||||
use build_json::*;
|
||||
use misc::*;
|
||||
|
||||
const BUILDJ: &str = "buildj";
|
||||
const BUILDJ: &str = "buildj";
|
||||
const BUDERJ_VER: &str = env!("CARGO_PKG_VERSION");
|
||||
const GIT_HASH: &str = env!("GIT_HASH");
|
||||
const GIT_HASH: &str = env!("GIT_HASH");
|
||||
const BUILD_DATE: &str = env!("BUILD_DATE");
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
use std::env;
|
||||
use rust_util::util_env::*;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use std::{
|
||||
fs::{self, File},
|
||||
fs::{ self, File },
|
||||
path::Path,
|
||||
};
|
||||
use rust_util::{
|
||||
@@ -7,9 +7,9 @@ use rust_util::{
|
||||
new_box_ioerror,
|
||||
util_os::is_macos_or_linux,
|
||||
};
|
||||
use super::{
|
||||
http::{ download_url, get_url_content, },
|
||||
local_util::{self, *},
|
||||
use crate::{
|
||||
http::{ download_url, get_url_content },
|
||||
local_util::{ self, * },
|
||||
misc::*,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user