File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " multisql-cli"
3
- version = " 0.0.3 "
3
+ version = " 0.1.0 "
4
4
authors = [
" Kyran Gostelow <[email protected] >" ]
5
5
edition = " 2021"
6
6
description = " MultiSQL CLI"
@@ -10,9 +10,9 @@ repository = "https://github.com/KyGost/multisql-cli"
10
10
[dependencies ]
11
11
dialoguer = " ^0"
12
12
indicatif = " ^0"
13
- multisql = " 0.1.2 "
13
+ multisql = " 0.1.3 "
14
14
lazy_static = " ^1"
15
15
console = " ^0"
16
16
cli-table = " ^0"
17
- serde_json = " ^1 "
17
+ serde_yaml = " 0.8.23 "
18
18
dirs = " ^4"
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ lazy_static! {
18
18
19
19
fn main ( ) {
20
20
let mut connection_file_path = dirs:: home_dir ( ) . unwrap ( ) ;
21
- connection_file_path. push ( ".multisql-cli.json " ) ;
21
+ connection_file_path. push ( ".multisql-cli.yaml " ) ;
22
22
23
23
let mut connection_file = OpenOptions :: new ( )
24
24
. read ( true )
@@ -34,7 +34,7 @@ fn main() {
34
34
connection_json = String :: from ( "[]" )
35
35
} ;
36
36
37
- let connections: Vec < ( String , Connection ) > = serde_json :: from_str ( & connection_json) . unwrap ( ) ;
37
+ let connections: Vec < ( String , Connection ) > = serde_yaml :: from_str ( & connection_json) . unwrap ( ) ;
38
38
let databases = connections
39
39
. into_iter ( )
40
40
. map ( |( name, connection) | ( name, connection. try_into ( ) . unwrap ( ) ) )
@@ -44,7 +44,7 @@ fn main() {
44
44
45
45
prompt ( & mut glue) ;
46
46
47
- let connection_json = serde_json :: to_string ( & glue. into_connections ( ) ) . unwrap ( ) ;
47
+ let connection_json = serde_yaml :: to_string ( & glue. into_connections ( ) ) . unwrap ( ) ;
48
48
connection_file. set_len ( 0 ) . unwrap ( ) ;
49
49
connection_file. seek ( SeekFrom :: Start ( 0 ) ) . unwrap ( ) ;
50
50
connection_file
You can’t perform that action at this time.
0 commit comments