diff options
| author | varkor <github@varkor.com> | 2019-10-08 01:14:42 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-12-06 12:23:23 +0000 |
| commit | e3a8ea4e18a50da60036d2731768a9cb78c90f5a (patch) | |
| tree | 05443dd965f6dc9c520cf22a1f63c60689953146 /src/libsyntax/print | |
| parent | 51901eea8c918fd55506b3e6311857d4f5bd1ba5 (diff) | |
| download | rust-e3a8ea4e18a50da60036d2731768a9cb78c90f5a.tar.gz rust-e3a8ea4e18a50da60036d2731768a9cb78c90f5a.zip | |
Use `to_option` in various places
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 4821bbd9ec6..b0e13a508ee 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -317,7 +317,7 @@ pub fn token_to_string(token: &Token) -> String { } fn token_to_string_ext(token: &Token, convert_dollar_crate: bool) -> String { - let convert_dollar_crate = if convert_dollar_crate { Some(token.span) } else { None }; + let convert_dollar_crate = convert_dollar_crate.to_option(token.span); token_kind_to_string_ext(&token.kind, convert_dollar_crate) } |
