Commit 8500acad authored by Ben Boeckel's avatar Ben Boeckel
Browse files

style: sort use statements

The order is stdlib before external crates before internal modules.
parent dfd8e3c7
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[rustversion::since(1.38)]
use std::any;
use std::borrow::Borrow;
use std::fmt::{self, Debug, Display};
use crates::itertools::Itertools; use crates::itertools::Itertools;
use crates::percent_encoding::{utf8_percent_encode, AsciiSet, PercentEncode, CONTROLS}; use crates::percent_encoding::{utf8_percent_encode, AsciiSet, PercentEncode, CONTROLS};
use crates::reqwest::header::{self, HeaderValue}; use crates::reqwest::header::{self, HeaderValue};
...@@ -17,11 +22,6 @@ use crates::thiserror::Error; ...@@ -17,11 +22,6 @@ use crates::thiserror::Error;
use types::*; use types::*;
#[rustversion::since(1.38)]
use std::any;
use std::borrow::Borrow;
use std::fmt::{self, Debug, Display};
const PATH_SEGMENT_ENCODE_SET: &AsciiSet = &CONTROLS const PATH_SEGMENT_ENCODE_SET: &AsciiSet = &CONTROLS
.add(b' ') .add(b' ')
.add(b'"') .add(b'"')
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use std::fs::File;
use crates::chrono::{NaiveDate, TimeZone, Utc}; use crates::chrono::{NaiveDate, TimeZone, Utc};
use crates::serde::de::DeserializeOwned; use crates::serde::de::DeserializeOwned;
use crates::serde_json::{from_reader, json}; use crates::serde_json::{from_reader, json};
use types::*; use types::*;
use std::fs::File;
fn read_test_file<T: DeserializeOwned>(name: &str) -> T { fn read_test_file<T: DeserializeOwned>(name: &str) -> T {
let fin = File::open(format!( let fin = File::open(format!(
concat!(env!("CARGO_MANIFEST_DIR"), "/data/{}.json"), concat!(env!("CARGO_MANIFEST_DIR"), "/data/{}.json"),
......
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
//! problems when the types and names change inside of those. If found, issues should be filed //! problems when the types and names change inside of those. If found, issues should be filed
//! upstream. //! upstream.
use std::fmt::{self, Display, Formatter};
use crates::chrono::{DateTime, NaiveDate, Utc}; use crates::chrono::{DateTime, NaiveDate, Utc};
use crates::serde::de::{DeserializeOwned, Error, Unexpected}; use crates::serde::de::{DeserializeOwned, Error, Unexpected};
use crates::serde::{Deserialize, Deserializer, Serialize, Serializer}; use crates::serde::{Deserialize, Deserializer, Serialize, Serializer};
use crates::serde_json::{self, Value}; use crates::serde_json::{self, Value};
use std::fmt::{self, Display, Formatter};
// This is only used in internal API calls. // This is only used in internal API calls.
//#[derive(Serialize, Deserialize, Debug, Clone)] //#[derive(Serialize, Deserialize, Debug, Clone)]
//pub struct UserSafe { //pub struct UserSafe {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment