From 1c42c390c0d076d8c25eb9d29767da151dd590d0 Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Sun, 29 Sep 2019 17:14:57 +0300 Subject: Create separate files for psks. --- src/manager/updater.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/manager/updater.rs') 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; -- cgit