File tree Expand file tree Collapse file tree 5 files changed +15
-27
lines changed
Expand file tree Collapse file tree 5 files changed +15
-27
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name = "wof"
33version = " 0.2.0"
44authors = [" Jones Magloire @Joxit" ]
55description = " The Who's On First rust library and command line."
6- edition = " 2018 "
6+ edition = " 2024 "
77license = " MIT"
88autobins = false
99repository = " https://github.com/Joxit/wof-cli"
@@ -28,20 +28,19 @@ json = "^0.12.2"
2828walkdir = " ^2.3.1"
2929regex = " ^1.3.3"
3030libc = " ^0.2.67"
31- shapefile = " ^0.5 .0"
31+ shapefile = " ^0.7 .0"
3232md5 = " ^0.7.0"
3333postgres = " ^0.19.3"
3434lazy_static = " ^1.4.0"
35- which = { version = " ^4.4.2" , optional = true }
3635tar = { version = " ^0.4.26" , optional = true }
3736flate2 = { version = " ^1.0.13" , optional = true }
38- attohttpc = { version = " ^0.26.1 " , optional = true }
37+ attohttpc = { version = " ^0.29.2 " , optional = true }
3938chrono = { version = " ^0.4.10" , optional = true }
4039clap = { version = " ^4.4" , features = [" derive" , " env" ], optional = true }
4140clap_complete = { version = " ^4.4" , optional = true }
4241
4342[dependencies .gdal ]
44- version = " ^0.16 "
43+ version = " ^0.18 "
4544features = [" bindgen" ]
4645optional = true
4746
@@ -51,17 +50,17 @@ features = ["std"]
5150optional = true
5251
5352[dependencies .git2 ]
54- version = " ^0.18 "
53+ version = " ^0.20 "
5554features = [" vendored-openssl" ]
5655optional = true
5756
5857[dependencies .rusqlite ]
59- version = " 0.29.0 "
58+ version = " 0.36 "
6059features = [" bundled" ]
6160
6261[features ]
62+ default = [" cli" ]
6363cli = [
64- " which" ,
6564 " tar" ,
6665 " flate2" ,
6766 " clap" ,
Original file line number Diff line number Diff line change @@ -104,17 +104,6 @@ impl Command {
104104 cmd_args. push ( raw_cmd. to_string ( ) ) ;
105105 cmd_args. push ( opt. to_string ( ) ) ;
106106 }
107-
108- pub fn assert_cmd_exists ( binary : & ' static str , install : & ' static str ) {
109- which:: which ( binary) . expect_exit_code (
110- format ! (
111- "The command `{}` not found, please run `{}` first" ,
112- binary, install
113- )
114- . as_ref ( ) ,
115- 127 ,
116- ) ;
117- }
118107}
119108
120109pub fn assert_directory_exists < P : AsRef < Path > > ( path : P ) {
Original file line number Diff line number Diff line change 3636 pub fn write_object_value_by_key ( & mut self , key : & str , value : & JsonValue ) -> io:: Result < ( ) > {
3737 match key {
3838 "bbox" => {
39- if let JsonValue :: Array ( ref array) = value {
39+ if let JsonValue :: Array ( array) = value {
4040 self . write_char ( b'[' ) ?;
4141 let mut iter = array. iter ( ) ;
4242
Original file line number Diff line number Diff line change @@ -44,19 +44,19 @@ pub trait JsonUtils {
4444 }
4545 fn as_object ( & self ) -> Option < & JsonObject > {
4646 match & self . as_json_value ( ) {
47- JsonValue :: Object ( ref obj) => Some ( obj) ,
47+ JsonValue :: Object ( obj) => Some ( obj) ,
4848 _ => None ,
4949 }
5050 }
5151 fn as_mut_object ( & mut self ) -> Option < & mut JsonObject > {
5252 match self . as_mut_json_value ( ) {
53- JsonValue :: Object ( ref mut obj) => Some ( obj) ,
53+ JsonValue :: Object ( obj) => Some ( obj) ,
5454 _ => None ,
5555 }
5656 }
5757 fn keys ( & self ) -> Vec < String > {
5858 match & self . as_json_value ( ) {
59- JsonValue :: Object ( ref obj) => {
59+ JsonValue :: Object ( obj) => {
6060 let mut keys = Vec :: new ( ) ;
6161 for ( k, _) in obj. iter ( ) {
6262 keys. push ( k. to_string ( ) ) ;
@@ -68,7 +68,7 @@ pub trait JsonUtils {
6868 }
6969 fn as_array ( & self ) -> Option < & Vec < JsonValue > > {
7070 match & self . as_json_value ( ) {
71- JsonValue :: Array ( ref array) => Some ( array) ,
71+ JsonValue :: Array ( array) => Some ( array) ,
7272 _ => None ,
7373 }
7474 }
Original file line number Diff line number Diff line change @@ -91,9 +91,9 @@ impl<'a> WOFGeoJSON<'a> {
9191
9292 fn is_property_deprecated ( & self , prop : & ' static str ) -> bool {
9393 match self . properties . get ( prop) {
94- Some ( JsonValue :: String ( ref s) ) => s != "uuuu" ,
95- Some ( JsonValue :: Boolean ( ref b) ) => * b,
96- Some ( JsonValue :: Array ( ref a) ) => a. len ( ) > 0 ,
94+ Some ( JsonValue :: String ( s) ) => s != "uuuu" ,
95+ Some ( JsonValue :: Boolean ( b) ) => * b,
96+ Some ( JsonValue :: Array ( a) ) => a. len ( ) > 0 ,
9797 _ => false ,
9898 }
9999 }
You can’t perform that action at this time.
0 commit comments