This repository was archived by the owner on Oct 21, 2023. It is now read-only.
File tree 2 files changed +6
-41
lines changed
2 files changed +6
-41
lines changed Original file line number Diff line number Diff line change 1
- use std:: path:: { Path , PathBuf } ;
1
+ use std:: path:: Path ;
2
2
3
+ pub mod log;
3
4
pub mod login;
4
5
pub mod plugin;
5
-
6
- const SERVICE_CONFIG_PATH : & str = "service" ;
6
+ pub mod service;
7
7
8
8
pub fn service_config_dir_path ( ) -> & ' static Path {
9
+ static SERVICE_CONFIG_PATH : & str = "service" ;
9
10
Path :: new ( SERVICE_CONFIG_PATH )
10
11
}
11
12
12
- const CLIENTS_PATH : & str = "clients" ;
13
-
14
13
pub fn clients_dir_path ( ) -> & ' static Path {
14
+ static CLIENTS_PATH : & str = "clients" ;
15
15
Path :: new ( CLIENTS_PATH )
16
16
}
17
-
18
- pub struct Config {
19
- file : PathBuf ,
20
- }
21
-
22
- #[ derive( Default ) ]
23
- pub struct ConfigBuilder < ' a > {
24
- root : PathBuf ,
25
- file : Option < & ' a str > ,
26
- }
27
-
28
- impl < ' a > ConfigBuilder < ' a > {
29
- pub fn new ( ) -> Self {
30
- Self :: default ( )
31
- }
32
-
33
- pub fn with_root < P : Into < PathBuf > > ( mut self , root : P ) -> Self {
34
- self . root = root. into ( ) ;
35
- self
36
- }
37
-
38
- pub fn with_file ( mut self , name : & ' a str ) -> Self {
39
- self . file = Some ( name) ;
40
- self
41
- }
42
-
43
- pub fn build ( self ) -> Option < Config > {
44
- let mut path = self . root ;
45
-
46
- path. push ( self . file ?) ;
47
-
48
- Some ( Config { file : path } )
49
- }
50
- }
Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ use super::cast_ref;
2
2
use crate :: service:: plugin:: PluginManager ;
3
3
use atri_ffi:: error:: FFIResult ;
4
4
use atri_ffi:: future:: FFIFuture ;
5
- use atri_ffi:: { Managed , RustString } ;
6
- use std:: ffi:: { c_char, CStr } ;
5
+ use atri_ffi:: Managed ;
7
6
use std:: future:: Future ;
8
7
9
8
pub extern "C" fn plugin_manager_spawn (
You can’t perform that action at this time.
0 commit comments