We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13a5e29 commit 973ba89Copy full SHA for 973ba89
1 file changed
src/utils.rs
@@ -6,7 +6,6 @@ use std::{
6
io::{prelude::*, Result},
7
path::Path,
8
};
9
-#[allow(dead_code)]
10
pub enum Save {
11
Storage,
12
Running,
@@ -47,9 +46,7 @@ pub fn start_v2core() -> String {
47
46
Ok(output) => output,
48
Err(_) => {
49
let core = "{\n\"v2core\":\"/usr/bin/v2ray\"\n}".to_string();
50
- if let Err(err) = create_json_file(Save::V2ray, core.clone()) {
51
- panic!("{}", err);
52
- }
+ create_json_file(Save::V2ray, core.clone()).unwrap_or_else(|err| panic!("{}", err));
53
core
54
}
55
0 commit comments