mirror of
https://github.com/astral-sh/ruff
synced 2026-01-23 06:20:55 -05:00
Run rustfmt on nightly to clean up erroneous comments (#5106)
## Summary This PR runs `rustfmt` with a few nightly options as a one-time fix to catch some malformatted comments. I ended up just running with: ```toml condense_wildcard_suffixes = true edition = "2021" max_width = 100 normalize_comments = true normalize_doc_attributes = true reorder_impl_items = true unstable_features = true use_field_init_shorthand = true ``` Since these all seem like reasonable things to fix, so may as well while I'm here.
This commit is contained in:
@@ -25,8 +25,8 @@ impl Debug for CommentRanges {
|
||||
}
|
||||
|
||||
impl<'a> IntoIterator for &'a CommentRanges {
|
||||
type Item = &'a TextRange;
|
||||
type IntoIter = std::slice::Iter<'a, TextRange>;
|
||||
type Item = &'a TextRange;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.raw.iter()
|
||||
|
||||
@@ -245,12 +245,11 @@ impl IndexKind {
|
||||
pub struct OneIndexed(NonZeroUsize);
|
||||
|
||||
impl OneIndexed {
|
||||
/// The largest value that can be represented by this integer type
|
||||
pub const MAX: Self = unwrap(Self::new(usize::MAX));
|
||||
// SAFETY: These constants are being initialized with non-zero values
|
||||
/// The smallest value that can be represented by this integer type.
|
||||
pub const MIN: Self = unwrap(Self::new(1));
|
||||
/// The largest value that can be represented by this integer type
|
||||
pub const MAX: Self = unwrap(Self::new(usize::MAX));
|
||||
|
||||
pub const ONE: NonZeroUsize = unwrap(NonZeroUsize::new(1));
|
||||
|
||||
/// Creates a non-zero if the given value is not zero.
|
||||
|
||||
Reference in New Issue
Block a user