Unnamed repository; edit this file 'description' to name the repository.
Refactor
Johann Hemmann 2024-02-01
parent c4302ea · commit f191b80
-rw-r--r--crates/hir-def/src/hir/format_args.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir-def/src/hir/format_args.rs b/crates/hir-def/src/hir/format_args.rs
index dc09b0ef3e..22864b3289 100644
--- a/crates/hir-def/src/hir/format_args.rs
+++ b/crates/hir-def/src/hir/format_args.rs
@@ -178,9 +178,9 @@ pub(crate) fn parse(
let text = s.text_without_quotes();
let str_style = match s.quote_offsets() {
Some(offsets) => {
- let raw = u32::from(offsets.quotes.0.len()) - 1;
+ let raw = usize::from(offsets.quotes.0.len()) - 1;
// subtract 1 for the `r` prefix
- (raw != 0).then(|| raw as usize - 1)
+ (raw != 0).then(|| raw - 1)
}
None => None,
};