Skip to content

Commit

Permalink
Move replacements access to method
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Aug 16, 2023
1 parent 8e1527b commit 964f49c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub(crate) fn call(checker: &mut Checker, string: &str, range: TextRange) {
}
Err(_) => {}
Ok(format_spec) => {
for replacement in format_spec.replacements {
for replacement in format_spec.replacements() {
let FormatPart::Field { format_spec, .. } = replacement else {
continue;
};
Expand Down
2 changes: 1 addition & 1 deletion crates/ruff_python_literal/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ pub struct FormatSpec {
// Ex) `f` in `'{:+f}'`
format_type: Option<FormatType>,
// Ex) `x` and `y` in `'{:*{x},{y}b}'`
pub replacements: Vec<FormatPart>,
replacements: Vec<FormatPart>,
}

fn get_num_digits(text: &str) -> usize {
Expand Down

0 comments on commit 964f49c

Please sign in to comment.