mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 09:09:03 +03:00
feat: support downloading via token auth (#603)
This commit is contained in:
@@ -8,10 +8,10 @@ use std::{
|
||||
time::{Duration, SystemTime, UNIX_EPOCH},
|
||||
};
|
||||
|
||||
pub fn unix_now() -> Result<Duration> {
|
||||
pub fn unix_now() -> Duration {
|
||||
SystemTime::now()
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.with_context(|| "Invalid system time")
|
||||
.expect("Unable to get unix epoch time")
|
||||
}
|
||||
|
||||
pub fn encode_uri(v: &str) -> String {
|
||||
|
||||
Reference in New Issue
Block a user