Implement Ranged on more structs (#6921)

Now that it's in `ruff_text_size`, we can use it in a few places that we
couldn't before.
This commit is contained in:
Charlie Marsh 2023-08-27 15:03:08 -04:00 committed by GitHub
parent fc89976c24
commit 059757a8c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 104 additions and 115 deletions

View file

@ -1,8 +1,10 @@
mod call_stack;
mod line_suffixes;
mod printer_options;
mod queue;
mod stack;
use std::num::NonZeroU8;
use drop_bomb::DebugDropBomb;
use unicode_width::UnicodeWidthChar;
pub use printer_options::*;
use ruff_text_size::{Ranged, TextLen, TextSize};
use crate::format_element::document::Document;
use crate::format_element::tag::{Condition, GroupMode};
@ -21,11 +23,12 @@ use crate::{
ActualStart, FormatElement, GroupId, IndentStyle, InvalidDocumentError, PrintError,
PrintResult, Printed, SourceMarker, TextRange,
};
use drop_bomb::DebugDropBomb;
pub use printer_options::*;
use ruff_text_size::{TextLen, TextSize};
use std::num::NonZeroU8;
use unicode_width::UnicodeWidthChar;
mod call_stack;
mod line_suffixes;
mod printer_options;
mod queue;
mod stack;
/// Prints the format elements into a string
#[derive(Debug, Default)]