Skip to content

Commit c753791

Browse files
committed
style: move std imports to the top
1 parent 35f3549 commit c753791

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

src/api.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@
2424
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2525
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626

27-
use crates::errno;
28-
use crates::libc;
29-
use crates::libkeyutils_sys::*;
30-
31-
use constants::{DefaultKeyring, KeyPermissions, KeyringSerial, Permission, SpecialKeyring};
32-
use keytype::*;
33-
use keytypes;
34-
3527
use std::borrow::Borrow;
3628
use std::ffi::CString;
3729
use std::mem;
@@ -40,6 +32,14 @@ use std::result;
4032
use std::str;
4133
use std::time::Duration;
4234

35+
use crates::errno;
36+
use crates::libc;
37+
use crates::libkeyutils_sys::*;
38+
39+
use constants::{DefaultKeyring, KeyPermissions, KeyringSerial, Permission, SpecialKeyring};
40+
use keytype::*;
41+
use keytypes;
42+
4343
/// Reexport of `Errno` as `Error`.
4444
pub type Error = errno::Errno;
4545
/// Simpler `Result` type with the error already set.
@@ -805,11 +805,11 @@ impl KeyManager {
805805

806806
#[cfg(test)]
807807
mod tests {
808-
use crates::libc;
809-
810808
use std::thread;
811809
use std::time::Duration;
812810

811+
use crates::libc;
812+
813813
use api::Keyring;
814814
use constants::{Permission, SpecialKeyring};
815815
use keytype::KeyType;

src/keytypes/blacklist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626

2727
//! Certificate blacklist keys
2828
29+
use std::borrow::Cow;
30+
2931
use keytype::*;
3032
use keytypes::AsciiHex;
3133

32-
use std::borrow::Cow;
33-
3434
/// Blacklist hashes.
3535
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
3636
pub struct Blacklist;

src/keytypes/dns_resolver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626

2727
//! DNS resolution keys
2828
29-
use keytype::*;
30-
3129
use std::borrow::Cow;
3230

31+
use keytype::*;
32+
3333
/// A DNS resolver key.
3434
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
3535
pub struct DnsResolver;

src/keytypes/encrypted.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626

2727
//! Encrypted keys
2828
29+
use std::borrow::Cow;
30+
2931
use keytype::*;
3032
use keytypes::AsciiHex;
3133

32-
use std::borrow::Cow;
33-
3434
/// Encrypted keys.
3535
///
3636
/// Encrypted keys are very similar to `Trusted` keys, however they do not require a TPM to

src/keytypes/logon.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
//!
2929
//! Logon keys are arbitrary keys that userspace cannot read once set.
3030
31+
use std::borrow::Cow;
32+
3133
use crates::libkeyutils_sys::KEY_TYPE_LOGON;
3234

3335
use keytype::*;
3436

35-
use std::borrow::Cow;
36-
3737
/// Keys which can only be created and updated from userspace but not read back.
3838
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
3939
pub struct Logon;

src/keytypes/rxrpc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2525
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626

27-
use keytype::*;
28-
2927
use std::borrow::Cow;
3028

29+
use keytype::*;
30+
3131
/// An RxRPC client key.
3232
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
3333
pub struct RxRPC;

src/keytypes/rxrpc_s.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626

2727
//! RxRPC server keys
2828
29-
use keytype::*;
30-
3129
use std::borrow::Cow;
3230

31+
use keytype::*;
32+
3333
/// An RxRPC server key.
3434
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
3535
pub struct RxRPCServer;

src/keytypes/trusted.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626

2727
//! Trusted keys
2828
29+
use std::borrow::Cow;
30+
2931
use crates::itertools::Itertools;
3032

3133
use keytype::*;
3234
use keytypes::AsciiHex;
3335

34-
use std::borrow::Cow;
35-
3636
/// Trusted keys are rooted in the TPM.
3737
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
3838
pub struct Trusted;

0 commit comments

Comments
 (0)