提交 6e852cc4 编写于 作者: M Matthias Krüger

remove redundant clones (clippy::redundant_clone)

上级 c34c015f
......@@ -1317,7 +1317,7 @@ pub fn resolve_vars_if_possible<T>(&self, value: T) -> T
T: TypeFoldable<'tcx>,
{
if !value.needs_infer() {
return value.clone(); // Avoid duplicated subst-folding.
return value; // Avoid duplicated subst-folding.
}
let mut r = resolve::OpportunisticVarResolver::new(self);
value.fold_with(&mut r)
......
......@@ -328,8 +328,8 @@ struct SplitIntRange {
}
impl SplitIntRange {
fn new(r: IntRange) -> Self {
SplitIntRange { range: r.clone(), borders: Vec::new() }
fn new(range: IntRange) -> Self {
SplitIntRange { range, borders: Vec::new() }
}
/// Internal use
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册