chore(lib): fix new unused_mut warnings in nightly

This commit is contained in:
Sean McArthur
2017-08-11 15:07:49 -07:00
parent f2db365613
commit 2ea125e609
6 changed files with 9 additions and 9 deletions

View File

@@ -170,7 +170,7 @@ impl FromStr for Basic {
match decode(s) {
Ok(decoded) => match String::from_utf8(decoded) {
Ok(text) => {
let mut parts = &mut text.split(':');
let parts = &mut text.split(':');
let user = match parts.next() {
Some(part) => part.to_owned(),
None => return Err(::Error::Header)

View File

@@ -495,7 +495,7 @@ impl FromStr for Link {
Some(p) => p.trim(),
};
let mut link_header = match link_values.last_mut() {
let link_header = match link_values.last_mut() {
None => return Err(::Error::Header),
Some(l) => l,
};

View File

@@ -79,7 +79,7 @@ impl<V: ?Sized + Any + 'static> PtrMapCell<V> {
#[inline]
pub fn get_mut(&mut self, key: TypeId) -> Option<&mut V> {
let mut map = unsafe { &mut *self.0.get() };
let map = unsafe { &mut *self.0.get() };
match *map {
PtrMap::Empty => None,
PtrMap::One(id, ref mut v) => if id == key {
@@ -107,7 +107,7 @@ impl<V: ?Sized + Any + 'static> PtrMapCell<V> {
#[inline]
pub unsafe fn insert(&self, key: TypeId, val: Box<V>) {
let mut map = &mut *self.0.get();
let map = &mut *self.0.get();
match *map {
PtrMap::Empty => *map = PtrMap::One(key, val),
PtrMap::One(..) => {