mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 00:44:26 +02:00
Fix clippy::rc_buffer (#1728)
This commit is contained in:
23
src/scope.rs
23
src/scope.rs
@ -442,16 +442,17 @@ where
|
||||
*self.factory_ref.borrow_mut() = Some(ScopeFactory {
|
||||
data: self.data.take().map(Rc::new),
|
||||
default: self.default.clone(),
|
||||
services: Rc::new(
|
||||
cfg.into_services()
|
||||
.1
|
||||
.into_iter()
|
||||
.map(|(mut rdef, srv, guards, nested)| {
|
||||
rmap.add(&mut rdef, nested);
|
||||
(rdef, srv, RefCell::new(guards))
|
||||
})
|
||||
.collect(),
|
||||
),
|
||||
services: cfg
|
||||
.into_services()
|
||||
.1
|
||||
.into_iter()
|
||||
.map(|(mut rdef, srv, guards, nested)| {
|
||||
rmap.add(&mut rdef, nested);
|
||||
(rdef, srv, RefCell::new(guards))
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.into_boxed_slice()
|
||||
.into(),
|
||||
});
|
||||
|
||||
// get guards
|
||||
@ -473,7 +474,7 @@ where
|
||||
|
||||
pub struct ScopeFactory {
|
||||
data: Option<Rc<Extensions>>,
|
||||
services: Rc<Vec<(ResourceDef, HttpNewService, RefCell<Option<Guards>>)>>,
|
||||
services: Rc<[(ResourceDef, HttpNewService, RefCell<Option<Guards>>)]>,
|
||||
default: Rc<RefCell<Option<Rc<HttpNewService>>>>,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user