diff rust/hg-core/src/config/config.rs @ 46481:0d734c0ae1cf

rust: replace read_whole_file with std::fs::read It does the same thing Differential Revision: https://phab.mercurial-scm.org/D9959
author Simon Sapin <simon.sapin@octobus.net>
date Mon, 01 Feb 2021 12:25:53 +0100
parents 0cb1b02228a6
children 2845892dd489
line wrap: on
line diff
--- a/rust/hg-core/src/config/config.rs	Tue Feb 09 09:37:39 2021 -0800
+++ b/rust/hg-core/src/config/config.rs	Mon Feb 01 12:25:53 2021 +0100
@@ -14,7 +14,6 @@
 use std::path::PathBuf;
 
 use crate::repo::Repo;
-use crate::utils::files::read_whole_file;
 
 /// Holds the config values for the current repository
 /// TODO update this docstring once we support more sources
@@ -64,7 +63,7 @@
                 ConfigSource::AbsPath(c) => {
                     // TODO check if it should be trusted
                     // mercurial/ui.py:427
-                    let data = match read_whole_file(&c) {
+                    let data = match std::fs::read(&c) {
                         Err(_) => continue, // same as the python code
                         Ok(data) => data,
                     };