Skip to content

Commit 4999cc8

Browse files
committed
Upcast
1 parent 103cc9c commit 4999cc8

File tree

1 file changed

+2
-2
lines changed
  • crates/ruff_python_formatter/src

1 file changed

+2
-2
lines changed

crates/ruff_python_formatter/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,14 @@ where
160160
pub fn formatted_file(db: &dyn Db, file: File) -> Result<FormattedFile, FormatModuleError> {
161161
let options = db.format_options(file);
162162

163-
let parsed = parsed_module(db, file);
163+
let parsed = parsed_module(db.upcast(), file);
164164

165165
if let Some(first) = parsed.errors().first() {
166166
return Err(FormatModuleError::ParseError(first.clone()));
167167
}
168168

169169
let comment_ranges = CommentRanges::from(parsed.tokens());
170-
let source = source_text(db, file);
170+
let source = source_text(db.upcast(), file);
171171

172172
let formatted = format_node(parsed, &comment_ranges, &source, options)?;
173173
let printed = formatted.print()?;

0 commit comments

Comments
 (0)