Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion influxdb_derive/src/writeable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,16 @@ impl TryFrom<Field> for WriteableField {
type Error = syn::Error;

fn try_from(field: Field) -> syn::Result<WriteableField> {
let ident = field.ident.expect("fields without ident are not supported");
let ident = match field.ident {
Some(i) => i,
None => {
return Err(syn::Error::new_spanned(
&field,
"fields without ident are not supported",
))
}
};

let mut is_tag = false;
let mut is_ignore = false;

Expand Down
Loading