aboutsummaryrefslogtreecommitdiff
path: root/src/manager/updater.rs
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2019-09-29 17:14:57 +0300
committerHristo Venev <hristo@venev.name>2019-09-29 18:06:10 +0300
commit1c42c390c0d076d8c25eb9d29767da151dd590d0 (patch)
tree3770fcae4e02c6ddca5e1f2914f61f2530271fce /src/manager/updater.rs
parent56d37f135536c7d17ab98c6671094925dee64a5e (diff)
Create separate files for psks.
Diffstat (limited to 'src/manager/updater.rs')
-rw-r--r--src/manager/updater.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/manager/updater.rs b/src/manager/updater.rs
index 14d55fc..67ed953 100644
--- a/src/manager/updater.rs
+++ b/src/manager/updater.rs
@@ -2,8 +2,8 @@
//
// See COPYING.
-use super::{load_file, update_file, Source};
-use crate::{config, proto};
+use super::Source;
+use crate::{config, fileutil, proto};
use std::ffi::{OsStr, OsString};
use std::path::PathBuf;
use std::time::{Duration, Instant};
@@ -31,7 +31,7 @@ impl Updater {
};
let data = serde_json::to_vec(&src.data).unwrap();
- match update_file(&path, &data) {
+ match fileutil::update(&path, &data) {
Ok(()) => {}
Err(e) => {
eprintln!("<4>Failed to cache [{}]: {}", &src.name, e);
@@ -40,12 +40,12 @@ impl Updater {
}
pub fn cache_load(&self, src: &mut Source) -> bool {
- let path = match self.cache_path(src) {
+ let path = match self.cache_path(src) {
Some(v) => v,
None => return false,
};
- let data = match load_file(&path) {
+ let data = match fileutil::load(&path) {
Ok(Some(data)) => data,
Ok(None) => {
return false;