mirror of
https://github.com/jht5945/buildj.git
synced 2025-12-28 01:31:35 +08:00
style: code style
This commit is contained in:
@@ -9,8 +9,7 @@ pub fn download_url(url: &str, dest: &mut File) -> XResult<()> {
|
||||
}
|
||||
let mut response = reqwest::get(url)?;
|
||||
let header_content_length: i64 = match response.headers().get("content-length") {
|
||||
None => -1_i64,
|
||||
Some(len_value) => {
|
||||
None => -1_i64, Some(len_value) => {
|
||||
let len_str = match len_value.to_str() {
|
||||
Ok(len_str) => len_str, Err(err) => {
|
||||
warning!("Get content length for {:?}, error: {}", len_value, err);
|
||||
|
||||
@@ -26,8 +26,7 @@ lazy_static! {
|
||||
|
||||
pub fn get_java_home(version: &str) -> Option<String> {
|
||||
match get_macos_java_home(version) {
|
||||
Some(j) => Some(j),
|
||||
None => match get_local_java_home(version) {
|
||||
Some(j) => Some(j), None => match get_local_java_home(version) {
|
||||
Some(j) => Some(j),
|
||||
None => iff!(get_cloud_java(version), get_local_java_home(version), None),
|
||||
},
|
||||
|
||||
@@ -6,11 +6,7 @@ use std::{
|
||||
process::Command,
|
||||
time::SystemTime,
|
||||
};
|
||||
use rust_util::{
|
||||
XResult,
|
||||
new_box_ioerror,
|
||||
util_io::*,
|
||||
};
|
||||
use rust_util::{ XResult, new_box_ioerror, util_io::* };
|
||||
use crypto::{
|
||||
digest::Digest,
|
||||
md5::Md5,
|
||||
|
||||
Reference in New Issue
Block a user