mirror of https://github.com/ctz/rustls
Fix extern crates and log expressions
This commit is contained in:
parent
5c2c750f5b
commit
ffbbc4e8c1
26
src/lib.rs
26
src/lib.rs
|
@ -104,8 +104,8 @@
|
|||
//! know what to expect to find in the server's certificate.
|
||||
//!
|
||||
//! ```no_run
|
||||
//! # extern crate rustls;
|
||||
//! # extern crate webpki;
|
||||
//! # use rustls;
|
||||
//! # use webpki;
|
||||
//! # use std::sync::Arc;
|
||||
//! # let mut config = rustls::ClientConfig::new();
|
||||
//! let rc_config = Arc::new(config);
|
||||
|
@ -201,31 +201,13 @@
|
|||
// underneath.
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(ptr_arg))]
|
||||
|
||||
// Our dependencies:
|
||||
|
||||
// webpki for certificate verification.
|
||||
extern crate webpki;
|
||||
|
||||
// *ring* for cryptography.
|
||||
extern crate ring;
|
||||
|
||||
// untrusted for feeding ring and webpki.
|
||||
extern crate untrusted;
|
||||
|
||||
// sct for validation of stapled certificate transparency SCTs.
|
||||
extern crate sct;
|
||||
|
||||
// rust-base64 for pemfile module.
|
||||
extern crate base64;
|
||||
|
||||
// log for logging (optional).
|
||||
#[cfg(feature = "logging")]
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
use log;
|
||||
|
||||
#[cfg(not(feature = "logging"))]
|
||||
#[macro_use]
|
||||
mod compile_out_log {
|
||||
mod log {
|
||||
macro_rules! trace ( ($($tt:tt)*) => {{}} );
|
||||
macro_rules! debug ( ($($tt:tt)*) => {{}} );
|
||||
macro_rules! info ( ($($tt:tt)*) => {{}} );
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::verify::ServerCertVerifier;
|
|||
use crate::key;
|
||||
use webpki;
|
||||
|
||||
extern crate webpki_roots;
|
||||
use webpki_roots;
|
||||
|
||||
fn duration_nanos(d: Duration) -> u64 {
|
||||
((d.as_secs() as f64) * 1e9 + (d.subsec_nanos() as f64)) as u64
|
||||
|
|
Loading…
Reference in New Issue