update use
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
use std::{
|
||||
fs::File,
|
||||
time::SystemTime,
|
||||
};
|
||||
use std::fs::File;
|
||||
use sha1::Sha1;
|
||||
use hmac::{
|
||||
Hmac,
|
||||
Mac,
|
||||
};
|
||||
use hmac::{ Hmac, Mac, };
|
||||
use reqwest::Response;
|
||||
use rust_util::*;
|
||||
|
||||
use rust_util::{
|
||||
iff,
|
||||
XResult,
|
||||
new_box_ioerror,
|
||||
util_time::get_current_secs,
|
||||
};
|
||||
|
||||
pub const DEFAULT_URL_VALID_IN_SECS: u64 = 1000;
|
||||
|
||||
@@ -136,8 +134,3 @@ fn calc_hmac_sha1(key: &[u8], message: &[u8]) -> String {
|
||||
Err(e) => format!("[ERROR]Hmac error: {}", e),
|
||||
}
|
||||
}
|
||||
|
||||
fn get_current_secs() -> u64 {
|
||||
SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_secs()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user