chore(lib): fix new unused_mut warnings in nightly
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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(..) => {
|
||||
|
||||
Reference in New Issue
Block a user