Implement Debug, Clone, PartialEq, Eq for Client
This commit is contained in:
parent
0ff7781eb7
commit
954975732b
|
@ -1,6 +1,5 @@
|
||||||
//! Client.
|
//! Client.
|
||||||
|
|
||||||
use std::fmt;
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
use hyper::{self, header, mime};
|
use hyper::{self, header, mime};
|
||||||
|
@ -18,6 +17,7 @@ pub use self::error::ClientError;
|
||||||
mod error;
|
mod error;
|
||||||
|
|
||||||
/// OAuth 2.0 client.
|
/// OAuth 2.0 client.
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
pub struct Client<P: Provider> {
|
pub struct Client<P: Provider> {
|
||||||
client_id: String,
|
client_id: String,
|
||||||
client_secret: String,
|
client_secret: String,
|
||||||
|
@ -25,16 +25,6 @@ pub struct Client<P: Provider> {
|
||||||
provider: PhantomData<P>,
|
provider: PhantomData<P>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<P: Provider> fmt::Debug for Client<P> {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
|
||||||
f.debug_struct("Client")
|
|
||||||
.field("client_id", &self.client_id)
|
|
||||||
.field("client_secret", &self.client_secret)
|
|
||||||
.field("redirect_uri", &self.redirect_uri)
|
|
||||||
.finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<P: Provider> Client<P> {
|
impl<P: Provider> Client<P> {
|
||||||
/// Creates a client.
|
/// Creates a client.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue