mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-28 20:10:35 +02:00
Fix clippy warnings (#40)
Add explicit `dyn`s Remove let binding Use += Return false Derive Default for TcpConnector Squash if/else Remove unnecessary return keywords Use is_empty() Fix clippy attribute Allow mut_from_ref
This commit is contained in:
@ -151,7 +151,7 @@ impl<'de, T: ResourcePath + 'de> Deserializer<'de> for PathDeserializer<'de, T>
|
||||
where
|
||||
V: Visitor<'de>,
|
||||
{
|
||||
if self.path.len() < 1 {
|
||||
if self.path.is_empty() {
|
||||
Err(de::value::Error::custom(
|
||||
"expeceted at least one parameters",
|
||||
))
|
||||
|
@ -93,7 +93,7 @@ impl<T: ResourcePath> Path<T> {
|
||||
#[inline]
|
||||
/// Skip first `n` chars in path
|
||||
pub fn skip(&mut self, n: u16) {
|
||||
self.skip = self.skip + n;
|
||||
self.skip += n;
|
||||
}
|
||||
|
||||
pub(crate) fn add(&mut self, name: Rc<String>, value: PathItem) {
|
||||
|
@ -207,7 +207,7 @@ impl ResourceDef {
|
||||
"Dynamic path match but not all segments found: {}",
|
||||
name
|
||||
);
|
||||
false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -279,7 +279,7 @@ impl ResourceDef {
|
||||
"Dynamic path match but not all segments found: {}",
|
||||
name
|
||||
);
|
||||
false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user