mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Refactor
This commit is contained in:
parent
c4302eaa56
commit
f191b80799
@ -178,9 +178,9 @@ pub(crate) fn parse(
|
|||||||
let text = s.text_without_quotes();
|
let text = s.text_without_quotes();
|
||||||
let str_style = match s.quote_offsets() {
|
let str_style = match s.quote_offsets() {
|
||||||
Some(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
|
// subtract 1 for the `r` prefix
|
||||||
(raw != 0).then(|| raw as usize - 1)
|
(raw != 0).then(|| raw - 1)
|
||||||
}
|
}
|
||||||
None => None,
|
None => None,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user