Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
e9ebbee957 | |||
5211481226 | |||
fd230db0cb | |||
92a95f33d4 | |||
7e13f93ee3 | |||
36afc8732e | |||
abeed1f971 | |||
03a0743517 | |||
cbfd56b33a | |||
9c5208d6e4 | |||
92d7b6668a | |||
97510fa325 | |||
65ba104de1 | |||
9599d934a2 | |||
61e2dd174a | |||
fe00cddd47 | |||
9b73c99922 | |||
ed3da3a2c3 | |||
504476b145 | |||
9bc1b42750 | |||
140265b713 |
365
Cargo.lock
generated
365
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
18
Cargo.toml
18
Cargo.toml
@ -1,27 +1,27 @@
|
||||
[package]
|
||||
name = "hoc"
|
||||
version = "0.9.2"
|
||||
version = "0.9.5"
|
||||
authors = ["Valentin Brandl <vbrandl@riseup.net>"]
|
||||
edition = "2018"
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0"
|
||||
actix-web = "1.0.3"
|
||||
badge = "0.2.0"
|
||||
bytes = "0.4.12"
|
||||
futures = "0.1.27"
|
||||
futures = "0.1.28"
|
||||
git2 = "0.9.1"
|
||||
lazy_static = "1.3.0"
|
||||
log = "0.4.6"
|
||||
log4rs = "0.8.3"
|
||||
number_prefix = "0.3.0"
|
||||
openssl-probe = "0.1.2"
|
||||
reqwest = "0.9.17"
|
||||
serde = "1.0.91"
|
||||
serde_derive = "1.0.91"
|
||||
serde_json = "1.0.39"
|
||||
structopt = "0.2.16"
|
||||
reqwest = "0.9.18"
|
||||
serde = "1.0.94"
|
||||
serde_derive = "1.0.94"
|
||||
serde_json = "1.0.40"
|
||||
structopt = "0.2.18"
|
||||
|
||||
[build-dependencies]
|
||||
ructe = "0.6.2"
|
||||
ructe = "0.6.4"
|
||||
vergen = "3.0.4"
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::Error;
|
||||
use crate::error::{Error, Result};
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
fs::{create_dir_all, File, OpenOptions},
|
||||
@ -17,7 +17,7 @@ pub(crate) enum CacheState<'a> {
|
||||
}
|
||||
|
||||
impl<'a> CacheState<'a> {
|
||||
pub(crate) fn read_from_file(path: impl AsRef<Path>, head: &str) -> Result<CacheState, Error> {
|
||||
pub(crate) fn read_from_file(path: impl AsRef<Path>, head: &str) -> Result<CacheState> {
|
||||
if path.as_ref().exists() {
|
||||
let cache: Cache = serde_json::from_reader(BufReader::new(File::open(path)?))?;
|
||||
if cache.head == head {
|
||||
@ -49,7 +49,7 @@ pub(crate) struct Cache<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Cache<'a> {
|
||||
pub(crate) fn write_to_file(&self, path: impl AsRef<Path>) -> Result<(), Error> {
|
||||
pub(crate) fn write_to_file(&self, path: impl AsRef<Path>) -> Result<()> {
|
||||
create_dir_all(path.as_ref().parent().ok_or(Error::Internal)?)?;
|
||||
serde_json::to_writer(
|
||||
OpenOptions::new()
|
||||
|
Reference in New Issue
Block a user