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