From a105fd44c46d7c1e5f708fa42c383402617963da Mon Sep 17 00:00:00 2001 From: awiouy Date: Fri, 9 Feb 2018 21:24:58 +0100 Subject: [PATCH] core API: save_to_file, save_to_writer --- core/src/authentication.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/authentication.rs b/core/src/authentication.rs index 4e6cc262..f441a7fd 100644 --- a/core/src/authentication.rs +++ b/core/src/authentication.rs @@ -132,12 +132,12 @@ impl Credentials { File::open(path).ok().map(Credentials::from_reader) } - pub fn save_to_writer(&self, writer: &mut W) { + fn save_to_writer(&self, writer: &mut W) { let contents = serde_json::to_string(&self.clone()).unwrap(); writer.write_all(contents.as_bytes()).unwrap(); } - pub fn save_to_file>(&self, path: P) { + pub(crate) fn save_to_file>(&self, path: P) { let mut file = File::create(path).unwrap(); self.save_to_writer(&mut file) }