Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nicholas Bailey
rust-gitlab
Commits
8500acad
Commit
8500acad
authored
Oct 24, 2019
by
Ben Boeckel
⛰
Browse files
style: sort use statements
The order is stdlib before external crates before internal modules.
parent
dfd8e3c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/gitlab.rs
View file @
8500acad
...
...
@@ -4,6 +4,11 @@
// option. This file may not be copied, modified, or distributed
// 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
::
percent_encoding
::{
utf8_percent_encode
,
AsciiSet
,
PercentEncode
,
CONTROLS
};
use
crates
::
reqwest
::
header
::{
self
,
HeaderValue
};
...
...
@@ -17,11 +22,6 @@ use crates::thiserror::Error;
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
.add
(
b' '
)
.add
(
b'"'
)
...
...
src/test/types.rs
View file @
8500acad
...
...
@@ -4,14 +4,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use
std
::
fs
::
File
;
use
crates
::
chrono
::{
NaiveDate
,
TimeZone
,
Utc
};
use
crates
::
serde
::
de
::
DeserializeOwned
;
use
crates
::
serde_json
::{
from_reader
,
json
};
use
types
::
*
;
use
std
::
fs
::
File
;
fn
read_test_file
<
T
:
DeserializeOwned
>
(
name
:
&
str
)
->
T
{
let
fin
=
File
::
open
(
format!
(
concat!
(
env!
(
"CARGO_MANIFEST_DIR"
),
"/data/{}.json"
),
...
...
src/types.rs
View file @
8500acad
...
...
@@ -12,13 +12,13 @@
//! problems when the types and names change inside of those. If found, issues should be filed
//! upstream.
use
std
::
fmt
::{
self
,
Display
,
Formatter
};
use
crates
::
chrono
::{
DateTime
,
NaiveDate
,
Utc
};
use
crates
::
serde
::
de
::{
DeserializeOwned
,
Error
,
Unexpected
};
use
crates
::
serde
::{
Deserialize
,
Deserializer
,
Serialize
,
Serializer
};
use
crates
::
serde_json
::{
self
,
Value
};
use
std
::
fmt
::{
self
,
Display
,
Formatter
};
// This is only used in internal API calls.
//#[derive(Serialize, Deserialize, Debug, Clone)]
//pub struct UserSafe {
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment