1
0
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:
2020-08-02 15:58:55 +08:00
parent f21f124add
commit 4160011cab
3 changed files with 3 additions and 9 deletions

View File

@@ -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);

View File

@@ -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),
},

View File

@@ -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,