Skip to content

Commit b12c14a

Browse files
committed
chore: update all dependencies
1 parent 755aa9b commit b12c14a

File tree

5 files changed

+15
-27
lines changed

5 files changed

+15
-27
lines changed

Cargo.toml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "wof"
33
version = "0.2.0"
44
authors = ["Jones Magloire @Joxit"]
55
description = "The Who's On First rust library and command line."
6-
edition = "2018"
6+
edition = "2024"
77
license = "MIT"
88
autobins = false
99
repository = "https://github.com/Joxit/wof-cli"
@@ -28,20 +28,19 @@ json = "^0.12.2"
2828
walkdir = "^2.3.1"
2929
regex = "^1.3.3"
3030
libc = "^0.2.67"
31-
shapefile = "^0.5.0"
31+
shapefile = "^0.7.0"
3232
md5 = "^0.7.0"
3333
postgres = "^0.19.3"
3434
lazy_static = "^1.4.0"
35-
which = { version = "^4.4.2", optional = true }
3635
tar = { version = "^0.4.26", optional = true }
3736
flate2 = { version = "^1.0.13", optional = true }
38-
attohttpc = { version = "^0.26.1", optional = true }
37+
attohttpc = { version = "^0.29.2", optional = true }
3938
chrono = { version = "^0.4.10", optional = true }
4039
clap = { version = "^4.4", features = ["derive", "env"], optional = true }
4140
clap_complete = { version = "^4.4", optional = true }
4241

4342
[dependencies.gdal]
44-
version = "^0.16"
43+
version = "^0.18"
4544
features = ["bindgen"]
4645
optional = true
4746

@@ -51,17 +50,17 @@ features = ["std"]
5150
optional = true
5251

5352
[dependencies.git2]
54-
version = "^0.18"
53+
version = "^0.20"
5554
features = ["vendored-openssl"]
5655
optional = true
5756

5857
[dependencies.rusqlite]
59-
version = "0.29.0"
58+
version = "0.36"
6059
features = ["bundled"]
6160

6261
[features]
62+
default = ["cli"]
6363
cli = [
64-
"which",
6564
"tar",
6665
"flate2",
6766
"clap",

src/commands/mod.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff 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

120109
pub fn assert_directory_exists<P: AsRef<Path>>(path: P) {

src/ser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ where
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

src/utils/json.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

src/wof.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)