Skip to content

Commit aa5ac39

Browse files
committed
Bump edition
1 parent a3ec5a8 commit aa5ac39

File tree

37 files changed

+101
-95
lines changed

37 files changed

+101
-95
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ default-members = ["ogcapi"]
1616
[workspace.package]
1717
license = "MIT OR Apache-2.0"
1818
repository = "https://github.com/georust/ogcapi"
19-
edition = "2021"
19+
edition = "2024"
2020
categories = ["science::geospatial"]
2121
keywords = ["geography", "geo", "geospatial", "gis", "api"]
2222

examples/data-loader/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ geojson = { workspace = true, optional = true, features = ["geo-types"] }
2424
osmpbfreader = { version = "0.17.0", optional = true }
2525
serde_json = { workspace = true }
2626
sqlx = { version = "0.8.3", features = ["runtime-tokio-rustls", "postgres"] }
27-
tokio = { version = "1.43.0", features = ["full"] }
27+
tokio = { version = "1.43", features = ["full"] }
2828
tracing = "0.1.41"
2929
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
3030
url = { workspace = true, features = ["serde"] }

examples/data-loader/src/geojson.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use std::{convert::TryInto, io::Cursor, time::Instant};
22

33
use geo::Geometry;
4-
use geojson::{feature::Id, FeatureCollection};
4+
use geojson::{FeatureCollection, feature::Id};
55
use sqlx::types::Json;
66
use wkb::Endianness;
77

88
use ogcapi::{
9-
drivers::{postgres::Db, CollectionTransactions},
9+
drivers::{CollectionTransactions, postgres::Db},
1010
types::common::{Collection, Crs, Extent, SpatialExtent},
1111
};
1212

@@ -30,10 +30,11 @@ pub async fn load(args: Args) -> anyhow::Result<()> {
3030
.bbox
3131
.map(|bbox| Extent {
3232
spatial: Some(SpatialExtent {
33-
bbox: vec![bbox
34-
.as_slice()
35-
.try_into()
36-
.unwrap_or_else(|_| [-180.0, -90.0, 180.0, 90.0].into())],
33+
bbox: vec![
34+
bbox.as_slice()
35+
.try_into()
36+
.unwrap_or_else(|_| [-180.0, -90.0, 180.0, 90.0].into()),
37+
],
3738
crs: Crs::default(),
3839
}),
3940
..Default::default()

examples/data-loader/src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use clap::Parser;
2-
use tracing_subscriber::{prelude::*, EnvFilter};
2+
use tracing_subscriber::{EnvFilter, prelude::*};
33

44
#[tokio::main]
55
async fn main() -> anyhow::Result<()> {
@@ -35,7 +35,9 @@ async fn main() -> anyhow::Result<()> {
3535
data_loader::ogr::load(args).await?
3636
}
3737
x => {
38-
tracing::warn!("No loader found for extension `{x:?}`! May need to activate additional features.");
38+
tracing::warn!(
39+
"No loader found for extension `{x:?}`! May need to activate additional features."
40+
);
3941
}
4042
}
4143
}

examples/data-loader/src/ogr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ use arrow::{
88
json::ArrayWriter,
99
};
1010
use gdal::{
11-
cpl::CslStringList, spatial_ref::SpatialRef, vector::LayerAccess, ArrowArrayStream, Dataset,
11+
ArrowArrayStream, Dataset, cpl::CslStringList, spatial_ref::SpatialRef, vector::LayerAccess,
1212
};
1313

1414
use ogcapi::{
15-
drivers::{postgres::Db, CollectionTransactions},
15+
drivers::{CollectionTransactions, postgres::Db},
1616
types::common::{Bbox, Collection, Crs, Extent, SpatialExtent},
1717
};
1818

examples/data-loader/src/osm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use serde_json::{Map, Value};
66
use wkb::Endianness;
77

88
use ogcapi::{
9-
drivers::{postgres::Db, CollectionTransactions},
9+
drivers::{CollectionTransactions, postgres::Db},
1010
types::common::{Collection, Crs},
1111
};
1212

examples/demo-service/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ stac = []
1010
[dependencies]
1111
clap = { version = "4.5", features = ["derive", "env"] }
1212
dotenvy = "0.15.7"
13-
tokio = { version = "1.42", features = ["full"] }
13+
tokio = { version = "1.43", features = ["full"] }
1414
tracing = "0.1.41"
1515
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
1616

ogcapi-client/src/client.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
use std::cell::OnceCell;
22

33
use reqwest::{
4+
Url,
45
blocking::Client as ReqwestClient,
56
header::{HeaderMap, HeaderValue, USER_AGENT},
6-
Url,
77
};
88

99
#[cfg(not(feature = "stac"))]
1010
use ogcapi_types::features::Feature;
11-
#[cfg(feature = "stac")]
1211
use ogcapi_types::{
1312
common::{
14-
link_rel::{CHILD, ITEM, SELF},
15-
Link,
13+
Collection, Conformance, LandingPage, Links,
14+
link_rel::{CONFORMANCE, DATA, NEXT},
1615
},
17-
stac::{Catalog, Item as Feature, SearchParams, StacEntity},
16+
features::FeatureCollection,
1817
};
18+
#[cfg(feature = "stac")]
1919
use ogcapi_types::{
2020
common::{
21-
link_rel::{CONFORMANCE, DATA, NEXT},
22-
Collection, Conformance, LandingPage, Links,
21+
Link,
22+
link_rel::{CHILD, ITEM, SELF},
2323
},
24-
features::FeatureCollection,
24+
stac::{Catalog, Item as Feature, SearchParams, StacEntity},
2525
};
2626

2727
use crate::Error;

ogcapi-drivers/src/postgres/edr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ impl EdrQuerier for Db {
6161
)
6262
} else {
6363
format!(
64-
"ST_DWithin(ST_Transform(geom, 4326)::geography, ST_Transform(ST_GeomFromEWKT('SRID={};{}'), 4326)::geography, {}, false)",
65-
srid, query.coords, distance
66-
)
64+
"ST_DWithin(ST_Transform(geom, 4326)::geography, ST_Transform(ST_GeomFromEWKT('SRID={};{}'), 4326)::geography, {}, false)",
65+
srid, query.coords, distance
66+
)
6767
}
6868
}
6969
QueryType::Cube => {

ogcapi-drivers/src/postgres/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ mod style;
1414
mod tile;
1515

1616
use sqlx::{
17+
Postgres,
1718
migrate::MigrateDatabase,
1819
postgres::{PgConnectOptions, PgPool, PgPoolOptions},
19-
Postgres,
2020
};
2121
use url::Url;
2222

0 commit comments

Comments
 (0)