Skip to content

Commit 9766dcb

Browse files
committed
chore: consolidate imports to crate
To auto-format, run `cargo +nightly fmt`
1 parent b85cb6b commit 9766dcb

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

rustfmt.toml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
imports_granularity = "Crate"

src/lib.rs

+15-10
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
#![deny(unused_crate_dependencies)]
44

55
use boon::{Compiler, SchemaIndex, Schemas, ValidationError};
6-
use geozero::geojson::{GeoJsonString, GeoJsonWriter};
7-
use geozero::wkt::Wkt;
8-
use geozero::{CoordDimensions, GeozeroGeometry, ToJson, ToWkt};
9-
use pest::iterators::{Pair, Pairs};
10-
use pest::pratt_parser::PrattParser;
11-
use pest::Parser;
6+
use geozero::{
7+
geojson::{GeoJsonString, GeoJsonWriter},
8+
wkt::Wkt,
9+
CoordDimensions, GeozeroGeometry, ToJson, ToWkt,
10+
};
11+
use pest::{
12+
iterators::{Pair, Pairs},
13+
pratt_parser::PrattParser,
14+
Parser,
15+
};
1216
use serde_derive::{Deserialize, Serialize};
1317
use serde_json::Value;
14-
use std::fs;
15-
use std::path::Path;
18+
use std::{fs, path::Path};
1619
use thiserror::Error;
1720

1821
/// Crate-specific error enum.
@@ -675,8 +678,10 @@ pub fn parse_file(path: impl AsRef<Path>) -> Result<Expr, Error> {
675678
}
676679

677680
fn get_stdin() -> Result<String, std::io::Error> {
678-
use std::env;
679-
use std::io::{self, IsTerminal};
681+
use std::{
682+
env,
683+
io::{self, IsTerminal},
684+
};
680685
let args: Vec<String> = env::args().collect();
681686
let mut buffer = String::new();
682687

tests/ogc_tests.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ use assert_json_diff::assert_json_eq;
22
use cql2::parse;
33
use rstest::rstest;
44
use serde_json::json;
5-
use std::fs;
6-
use std::path::PathBuf;
5+
use std::{fs, path::PathBuf};
76

87
pub fn validate_str(cql2: &str) {
98
println!("CQL2: {}", cql2);

0 commit comments

Comments
 (0)