Skip to content

Commit e83b7f9

Browse files
committed
Move DEFAULT_CONFIG_PATH to constants module
1 parent d1ac164 commit e83b7f9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

codechain/constants.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

17+
pub const DEFAULT_CONFIG_PATH: &'static str = "codechain/config/presets/config.dev.toml";
1718
pub const DEFAULT_KEYS_PATH: &'static str = "keys";

codechain/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,7 @@ fn run_subcommand(matches: ArgMatches) -> Result<(), String> {
171171
}
172172

173173
fn load_config(matches: &ArgMatches) -> Result<config::Config, String> {
174-
const DEFAULT_CONFIG_PATH: &'static str = "codechain/config/presets/config.dev.toml";
175-
176-
let config_path = matches.value_of("config").unwrap_or(DEFAULT_CONFIG_PATH);
174+
let config_path = matches.value_of("config").unwrap_or(constants::DEFAULT_CONFIG_PATH);
177175
let mut config = config::load(&config_path)?;
178176
config.ipc.overwrite_with(&matches)?;
179177
config.operating.overwrite_with(&matches)?;

0 commit comments

Comments
 (0)