More Rust updates:
- Some stray deriving -> derive changes
- use::{mod} -> use::{self}
- fmt.write -> fmt.write_str
This does not catch the last case of fmt.write_str in the
Show impl of a Header Item. This will need to be changed
separately.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use std::fmt::{mod, Show};
|
||||
use std::fmt::{self, Show};
|
||||
use std::str::{FromStr, from_utf8};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use serialize::base64::{ToBase64, FromBase64, Standard, Config, Newline};
|
||||
use header::{Header, HeaderFormat};
|
||||
|
||||
@@ -7,13 +8,15 @@ use header::{Header, HeaderFormat};
|
||||
#[derive(Clone, PartialEq, Show)]
|
||||
pub struct Authorization<S: Scheme>(pub S);
|
||||
|
||||
impl<S: Scheme> Deref<S> for Authorization<S> {
|
||||
impl<S: Scheme> Deref for Authorization<S> {
|
||||
type Target = S;
|
||||
|
||||
fn deref<'a>(&'a self) -> &'a S {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl<S: Scheme> DerefMut<S> for Authorization<S> {
|
||||
impl<S: Scheme> DerefMut for Authorization<S> {
|
||||
fn deref_mut<'a>(&'a mut self) -> &'a mut S {
|
||||
&mut self.0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user