mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-25 06:13:01 +00:00
Join implicit concatenated strings when they fit on a line (#13663)
This commit is contained in:
parent
e402e27a09
commit
73ee72b665
50 changed files with 3907 additions and 363 deletions
|
|
@ -1454,7 +1454,7 @@ impl<Context> std::fmt::Debug for Group<'_, Context> {
|
|||
/// layout doesn't exceed the line width too, in which case it falls back to the flat layout.
|
||||
///
|
||||
/// This IR is identical to the following [`best_fitting`] layout but is implemented as custom IR for
|
||||
/// best performance.
|
||||
/// better performance.
|
||||
///
|
||||
/// ```rust
|
||||
/// # use ruff_formatter::prelude::*;
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ where
|
|||
/// # Ok(())
|
||||
/// # }
|
||||
/// ```
|
||||
pub fn inspect(&mut self, f: &mut Formatter<Context>) -> FormatResult<&[FormatElement]> {
|
||||
pub fn inspect(&self, f: &mut Formatter<Context>) -> FormatResult<&[FormatElement]> {
|
||||
let result = self.memory.get_or_init(|| f.intern(&self.inner));
|
||||
|
||||
match result.as_ref() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue