1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

rework Guard trait (#2552)

This commit is contained in:
Rob Ede
2021-12-28 02:37:13 +00:00
committed by GitHub
parent 36193b0a50
commit 4616ca8ee6
11 changed files with 545 additions and 351 deletions

View File

@ -1,4 +1,4 @@
use std::{cell::RefCell, rc::Rc};
use std::{cell::RefCell, ops, rc::Rc};
use bitflags::bitflags;
@ -49,7 +49,7 @@ impl<T: Head> Message<T> {
}
}
impl<T: Head> std::ops::Deref for Message<T> {
impl<T: Head> ops::Deref for Message<T> {
type Target = T;
fn deref(&self) -> &Self::Target {
@ -57,7 +57,7 @@ impl<T: Head> std::ops::Deref for Message<T> {
}
}
impl<T: Head> std::ops::DerefMut for Message<T> {
impl<T: Head> ops::DerefMut for Message<T> {
fn deref_mut(&mut self) -> &mut Self::Target {
Rc::get_mut(&mut self.head).expect("Multiple copies exist")
}