1
Fork 0

minor tweaks

This commit is contained in:
DrMeepster 2023-04-21 01:44:17 -07:00
parent f92294f76b
commit 3206960ec6
8 changed files with 19 additions and 21 deletions

View file

@ -558,14 +558,13 @@ impl<'a> State<'a> {
self.word(",");
self.space();
let (&first, rest) =
fields.split_first().expect("offset_of! should have at least 1 field");
if let Some((&first, rest)) = fields.split_first() {
self.print_ident(first);
self.print_ident(first);
for &field in rest {
self.word(".");
self.print_ident(field);
for &field in rest {
self.word(".");
self.print_ident(field);
}
}
self.end();