Skip to content

Commit

Permalink
Organize imports in StdExternalCrate order
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Aug 29, 2024
1 parent 290bdac commit 202aee2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
18 changes: 9 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
// Enable documentation for all features on docs.rs
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

use std::env;
use std::ffi::OsStr;
use std::fs::{self, File};
use std::io::BufReader;
use std::io::{Error, ErrorKind};
use std::path::{Path, PathBuf};

use pki_types::CertificateDer;

#[cfg(all(unix, not(target_os = "macos")))]
mod unix;
#[cfg(all(unix, not(target_os = "macos")))]
Expand All @@ -36,15 +45,6 @@ mod macos;
#[cfg(target_os = "macos")]
use macos as platform;

use std::env;
use std::ffi::OsStr;
use std::fs::{self, File};
use std::io::BufReader;
use std::io::{Error, ErrorKind};
use std::path::{Path, PathBuf};

use pki_types::CertificateDer;

/// Load root certificates found in the platform's native certificate store.
///
/// ## Environment Variables
Expand Down
6 changes: 3 additions & 3 deletions src/macos.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use pki_types::CertificateDer;
use security_framework::trust_settings::{Domain, TrustSettings, TrustSettingsForCertificate};

use std::collections::HashMap;
use std::io::{Error, ErrorKind};

use pki_types::CertificateDer;
use security_framework::trust_settings::{Domain, TrustSettings, TrustSettingsForCertificate};

pub fn load_native_certs() -> Result<Vec<CertificateDer<'static>>, Error> {
// The various domains are designed to interact like this:
//
Expand Down
4 changes: 2 additions & 2 deletions src/unix.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::CertPaths;
use std::io::Error;

use pki_types::CertificateDer;

use std::io::Error;
use crate::CertPaths;

pub fn load_native_certs() -> Result<Vec<CertificateDer<'static>>, Error> {
let likely_locations = openssl_probe::probe();
Expand Down
4 changes: 2 additions & 2 deletions src/windows.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use pki_types::CertificateDer;

use std::io::Error;

use pki_types::CertificateDer;

static PKIX_SERVER_AUTH: &str = "1.3.6.1.5.5.7.3.1";

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

0 comments on commit 202aee2

Please sign in to comment.