mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
Upgrade Rust toolchain to 1.83 (#14677)
This commit is contained in:
parent
a6402fb51e
commit
b63c2e126b
63 changed files with 127 additions and 127 deletions
|
@ -407,7 +407,7 @@ pub enum StringLike<'a> {
|
|||
FString(&'a ast::ExprFString),
|
||||
}
|
||||
|
||||
impl<'a> StringLike<'a> {
|
||||
impl StringLike<'_> {
|
||||
pub const fn is_fstring(self) -> bool {
|
||||
matches!(self, Self::FString(_))
|
||||
}
|
||||
|
|
|
@ -669,7 +669,7 @@ impl<'a> Deref for SegmentsVec<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, 'b> PartialEq<SegmentsVec<'b>> for SegmentsVec<'a> {
|
||||
impl<'b> PartialEq<SegmentsVec<'b>> for SegmentsVec<'_> {
|
||||
fn eq(&self, other: &SegmentsVec<'b>) -> bool {
|
||||
self.as_slice() == other.as_slice()
|
||||
}
|
||||
|
|
|
@ -919,14 +919,14 @@ impl<'a> Iterator for DictKeyIterator<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for DictKeyIterator<'a> {
|
||||
impl DoubleEndedIterator for DictKeyIterator<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
self.items.next_back().map(DictItem::key)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> FusedIterator for DictKeyIterator<'a> {}
|
||||
impl<'a> ExactSizeIterator for DictKeyIterator<'a> {}
|
||||
impl FusedIterator for DictKeyIterator<'_> {}
|
||||
impl ExactSizeIterator for DictKeyIterator<'_> {}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct DictValueIterator<'a> {
|
||||
|
@ -961,14 +961,14 @@ impl<'a> Iterator for DictValueIterator<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for DictValueIterator<'a> {
|
||||
impl DoubleEndedIterator for DictValueIterator<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
self.items.next_back().map(DictItem::value)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> FusedIterator for DictValueIterator<'a> {}
|
||||
impl<'a> ExactSizeIterator for DictValueIterator<'a> {}
|
||||
impl FusedIterator for DictValueIterator<'_> {}
|
||||
impl ExactSizeIterator for DictValueIterator<'_> {}
|
||||
|
||||
/// See also [Set](https://docs.python.org/3/library/ast.html#ast.Set)
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
@ -3666,7 +3666,7 @@ impl<'a> Iterator for ParametersIterator<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for ParametersIterator<'a> {
|
||||
impl DoubleEndedIterator for ParametersIterator<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
let ParametersIterator {
|
||||
posonlyargs,
|
||||
|
@ -3692,11 +3692,11 @@ impl<'a> DoubleEndedIterator for ParametersIterator<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> FusedIterator for ParametersIterator<'a> {}
|
||||
impl FusedIterator for ParametersIterator<'_> {}
|
||||
|
||||
/// We rely on the same invariants outlined in the comment above `Parameters::len()`
|
||||
/// in order to implement `ExactSizeIterator` here
|
||||
impl<'a> ExactSizeIterator for ParametersIterator<'a> {}
|
||||
impl ExactSizeIterator for ParametersIterator<'_> {}
|
||||
|
||||
impl<'a> IntoIterator for &'a Parameters {
|
||||
type IntoIter = ParametersIterator<'a>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue