From 6e345fa0a87bc02932280ffc426edfa740f4a81d Mon Sep 17 00:00:00 2001 From: Zhou Kang Date: Wed, 21 Jun 2023 01:13:09 +0000 Subject: [PATCH] fix complie warning for snake case name --- bin/daemon.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/daemon.rs b/bin/daemon.rs index 6e7b2d8..792992d 100644 --- a/bin/daemon.rs +++ b/bin/daemon.rs @@ -40,7 +40,9 @@ pub struct RtoConfig { pub elf_path: String, pub mode: String, pub libs: Vec, - pub PATH: Option, + + #[serde(rename = "PATH")] + pub path: Option, #[serde(skip)] watch_paths: Vec, @@ -305,7 +307,7 @@ fn parse_elf_file(elf_path: &str) -> Option { fn find_libs(conf: &RtoConfig, elf: &Elf) -> Vec { let mut libs = conf.libs.clone(); - let confpaths_temp = conf.PATH.as_ref().map_or_else(String::new, |v| v.clone()); + let confpaths_temp = conf.path.as_ref().map_or_else(String::new, |v| v.clone()); let confpaths: Vec<&str> = confpaths_temp.split(':').collect(); let rpaths = elf.rpaths.clone(); if let Some(paths_temp) = env::var_os("PATH") { -- Gitee