mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 11:59:10 +00:00
Use Rust 1.75 toolchain (#9437)
This commit is contained in:
parent
ba71772d93
commit
94968fedd5
17 changed files with 63 additions and 30 deletions
|
@ -160,6 +160,10 @@ impl ImportMap {
|
|||
pub fn extend(&mut self, other: Self) {
|
||||
self.module_to_imports.extend(other.module_to_imports);
|
||||
}
|
||||
|
||||
pub fn iter(&self) -> std::collections::hash_map::Iter<String, Vec<ModuleImport>> {
|
||||
self.module_to_imports.iter()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoIterator for &'a ImportMap {
|
||||
|
@ -167,6 +171,6 @@ impl<'a> IntoIterator for &'a ImportMap {
|
|||
type Item = (&'a String, &'a Vec<ModuleImport>);
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.module_to_imports.iter()
|
||||
self.iter()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1129,6 +1129,14 @@ impl<'a> IntoIterator for &'a FStringValue {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoIterator for &'a mut FStringValue {
|
||||
type Item = &'a mut FStringPart;
|
||||
type IntoIter = IterMut<'a, FStringPart>;
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.iter_mut()
|
||||
}
|
||||
}
|
||||
|
||||
/// An internal representation of [`FStringValue`].
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
enum FStringValueInner {
|
||||
|
@ -1324,6 +1332,14 @@ impl<'a> IntoIterator for &'a StringLiteralValue {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoIterator for &'a mut StringLiteralValue {
|
||||
type Item = &'a mut StringLiteral;
|
||||
type IntoIter = IterMut<'a, StringLiteral>;
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.iter_mut()
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq<str> for StringLiteralValue {
|
||||
fn eq(&self, other: &str) -> bool {
|
||||
if self.len() != other.len() {
|
||||
|
@ -1547,6 +1563,14 @@ impl<'a> IntoIterator for &'a BytesLiteralValue {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoIterator for &'a mut BytesLiteralValue {
|
||||
type Item = &'a mut BytesLiteral;
|
||||
type IntoIter = IterMut<'a, BytesLiteral>;
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.iter_mut()
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq<[u8]> for BytesLiteralValue {
|
||||
fn eq(&self, other: &[u8]) -> bool {
|
||||
if self.len() != other.len() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue