mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 12:55:05 +00:00
refactor: Return copied TextRange
in CommentRanges
iterator (#13281)
This commit is contained in:
parent
e4aa479515
commit
35d45c1e4b
9 changed files with 20 additions and 20 deletions
|
@ -215,10 +215,10 @@ impl Debug for CommentRanges {
|
|||
}
|
||||
|
||||
impl<'a> IntoIterator for &'a CommentRanges {
|
||||
type Item = &'a TextRange;
|
||||
type IntoIter = std::slice::Iter<'a, TextRange>;
|
||||
type Item = TextRange;
|
||||
type IntoIter = std::iter::Copied<std::slice::Iter<'a, TextRange>>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.raw.iter()
|
||||
self.raw.iter().copied()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue