mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-05 22:07:38 +03:00
Clippy (#308)
This commit is contained in:
parent
5d4da464ac
commit
30ba29d18a
4 changed files with 5 additions and 5 deletions
|
@ -100,7 +100,7 @@ impl ResourceDef {
|
||||||
let mut elements = Vec::new();
|
let mut elements = Vec::new();
|
||||||
|
|
||||||
for path in set {
|
for path in set {
|
||||||
p = path.clone();
|
p.clone_from(&path);
|
||||||
let (pelems, elems) = ResourceDef::parse(&path);
|
let (pelems, elems) = ResourceDef::parse(&path);
|
||||||
tp.push(pelems);
|
tp.push(pelems);
|
||||||
elements = elems;
|
elements = elems;
|
||||||
|
@ -158,7 +158,7 @@ impl ResourceDef {
|
||||||
let mut elements = Vec::new();
|
let mut elements = Vec::new();
|
||||||
|
|
||||||
for path in patterns {
|
for path in patterns {
|
||||||
p = path.clone();
|
p.clone_from(&path);
|
||||||
let (pelems, elems) = ResourceDef::parse(&path);
|
let (pelems, elems) = ResourceDef::parse(&path);
|
||||||
tp.push(pelems);
|
tp.push(pelems);
|
||||||
elements = elems;
|
elements = elems;
|
||||||
|
|
|
@ -333,7 +333,7 @@ where
|
||||||
ResourceDef::new(self.rdef.clone())
|
ResourceDef::new(self.rdef.clone())
|
||||||
};
|
};
|
||||||
if let Some(ref name) = self.name {
|
if let Some(ref name) = self.name {
|
||||||
*rdef.name_mut() = name.clone();
|
rdef.name_mut().clone_from(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
let state = self.state.take().map(|state| {
|
let state = self.state.take().map(|state| {
|
||||||
|
|
|
@ -289,7 +289,7 @@ where
|
||||||
ResourceDef::new(self.rdef)
|
ResourceDef::new(self.rdef)
|
||||||
};
|
};
|
||||||
if let Some(ref name) = self.name {
|
if let Some(ref name) = self.name {
|
||||||
*rdef.name_mut() = name.clone();
|
rdef.name_mut().clone_from(name);
|
||||||
}
|
}
|
||||||
config.register_service(rdef, guards, self.srv, None)
|
config.register_service(rdef, guards, self.srv, None)
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,8 +216,8 @@ pub fn hash_key(key: &[u8]) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
#[allow(unused_imports, unused_variables, dead_code)]
|
||||||
mod test {
|
mod test {
|
||||||
#![allow(unused_imports, unused_variables, dead_code)]
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
macro_rules! opcode_into {
|
macro_rules! opcode_into {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue