Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: astral-sh/ruff
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bd932b7368604ef6502e5c10681e28a702508128
Choose a base ref
..
head repository: astral-sh/ruff
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e88cd07415fe9630d581cee925d919dd4a89c5a4
Choose a head ref
Showing with 1 addition and 1 deletion.
  1. +1 −1 crates/ruff_linter/src/rules/flake8_pyi/rules/unnecessary_type_union.rs
Original file line number Diff line number Diff line change
@@ -159,7 +159,7 @@ pub(crate) fn unnecessary_type_union<'a>(checker: &mut Checker, union: &'a Expr)
let union = Expr::Subscript(ast::ExprSubscript {
value: subscript.value.clone(),
slice: Box::new(Expr::Tuple(ast::ExprTuple {
elts: exprs.into_iter().map(|expr| expr.to_owned()).collect(),
elts: exprs.into_iter().cloned().collect(),
ctx: ExprContext::Load,
range: TextRange::default(),
})),