Skip to content

Commit ecfdec4

Browse files
committed
minor tweaks
1 parent 84385bf commit ecfdec4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/expr.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ pub(crate) fn format_expr(
345345
// Style Guide RFC for InlineAsm variant pending
346346
// https://github.com/rust-dev-tools/fmt-rfcs/issues/152
347347
ast::ExprKind::InlineAsm(..) => Some(context.snippet(expr.span).to_owned()),
348-
ast::ExprKind::OffsetOf(..) => Some(context.snippet(expr.span).to_owned()),
349348
ast::ExprKind::TryBlock(ref block) => {
350349
if let rw @ Some(_) =
351350
rewrite_single_line_block(context, "try ", block, Some(&expr.attrs), None, shape)
@@ -400,7 +399,7 @@ pub(crate) fn format_expr(
400399
}
401400
}
402401
ast::ExprKind::Underscore => Some("_".to_owned()),
403-
ast::ExprKind::FormatArgs(..) | ast::ExprKind::IncludedBytes(..) => {
402+
ast::ExprKind::FormatArgs(..) | ast::ExprKind::IncludedBytes(..) | ast::ExprKind::OffsetOf(..) => {
404403
// These do not occur in the AST because macros aren't expanded.
405404
unreachable!()
406405
}

0 commit comments

Comments
 (0)