[ui] Rearrange StringReader
/TokenTreesReader
creation.
`TokenTreesReader` wraps a `StringReader`, but the `into_token_trees` function obscures this. This commit moves to a more straightforward control flow.
This commit is contained in:
parent
33ba2776c9
commit
33516ac09a
2 changed files with 20 additions and 20 deletions
|
@ -48,7 +48,8 @@ pub(crate) fn parse_token_trees<'a>(
|
|||
start_pos = start_pos + BytePos::from_usize(shebang_len);
|
||||
}
|
||||
|
||||
StringReader { sess, start_pos, pos: start_pos, src, override_span }.into_token_trees()
|
||||
let string_reader = StringReader { sess, start_pos, pos: start_pos, src, override_span };
|
||||
tokentrees::TokenTreesReader::parse_token_trees(string_reader)
|
||||
}
|
||||
|
||||
struct StringReader<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue