fix(docs): Fix typo in `RUF015` description (#20873)

## Summary
Fixed a typo. It should be "or", not "of". Both `.pop()` and `next()` on
an empty collection will raise `IndexError`, not "`[0]` of the `pop()`
function"

## Test Plan

n/a
This commit is contained in:
Paillat 2025-10-14 23:38:31 +02:00 committed by GitHub
parent 43eddc566f
commit e1e3eb7209
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ use crate::{AlwaysFixableViolation, Edit, Fix};
/// element. As such, any side effects that occur during iteration will be /// element. As such, any side effects that occur during iteration will be
/// delayed. /// delayed.
/// 2. Second, accessing members of a collection via square bracket notation /// 2. Second, accessing members of a collection via square bracket notation
/// `[0]` of the `pop()` function will raise `IndexError` if the collection /// `[0]` or the `pop()` function will raise `IndexError` if the collection
/// is empty, while `next(iter(...))` will raise `StopIteration`. /// is empty, while `next(iter(...))` will raise `StopIteration`.
/// ///
/// ## References /// ## References