Skip to content

Commit 202aee2

Browse files
committed
Organize imports in StdExternalCrate order
1 parent 290bdac commit 202aee2

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
// Enable documentation for all features on docs.rs
2222
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
2323

24+
use std::env;
25+
use std::ffi::OsStr;
26+
use std::fs::{self, File};
27+
use std::io::BufReader;
28+
use std::io::{Error, ErrorKind};
29+
use std::path::{Path, PathBuf};
30+
31+
use pki_types::CertificateDer;
32+
2433
#[cfg(all(unix, not(target_os = "macos")))]
2534
mod unix;
2635
#[cfg(all(unix, not(target_os = "macos")))]
@@ -36,15 +45,6 @@ mod macos;
3645
#[cfg(target_os = "macos")]
3746
use macos as platform;
3847

39-
use std::env;
40-
use std::ffi::OsStr;
41-
use std::fs::{self, File};
42-
use std::io::BufReader;
43-
use std::io::{Error, ErrorKind};
44-
use std::path::{Path, PathBuf};
45-
46-
use pki_types::CertificateDer;
47-
4848
/// Load root certificates found in the platform's native certificate store.
4949
///
5050
/// ## Environment Variables

src/macos.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use pki_types::CertificateDer;
2-
use security_framework::trust_settings::{Domain, TrustSettings, TrustSettingsForCertificate};
3-
41
use std::collections::HashMap;
52
use std::io::{Error, ErrorKind};
63

4+
use pki_types::CertificateDer;
5+
use security_framework::trust_settings::{Domain, TrustSettings, TrustSettingsForCertificate};
6+
77
pub fn load_native_certs() -> Result<Vec<CertificateDer<'static>>, Error> {
88
// The various domains are designed to interact like this:
99
//

src/unix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use crate::CertPaths;
1+
use std::io::Error;
22

33
use pki_types::CertificateDer;
44

5-
use std::io::Error;
5+
use crate::CertPaths;
66

77
pub fn load_native_certs() -> Result<Vec<CertificateDer<'static>>, Error> {
88
let likely_locations = openssl_probe::probe();

src/windows.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use pki_types::CertificateDer;
2-
31
use std::io::Error;
42

3+
use pki_types::CertificateDer;
4+
55
static PKIX_SERVER_AUTH: &str = "1.3.6.1.5.5.7.3.1";
66

77
fn usable_for_rustls(uses: schannel::cert_context::ValidUses) -> bool {

0 commit comments

Comments
 (0)