Skip to content

Commit

Permalink
Change panic message
Browse files Browse the repository at this point in the history
  • Loading branch information
lok52 committed Mar 12, 2024
1 parent 1f3367b commit c377d7f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions actix-prost-build/src/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ impl ConversionsGenerator {
Kind::Message(m) => Some(m),
_ => None,
}?;
let map_key_rust_type = match map_type.map_entry_key_field().kind() {
let map_key_type = map_type.map_entry_key_field().kind();
let map_key_rust_type = match map_key_type {
Kind::String => quote!(::prost::alloc::string::String),
Kind::Int32 => quote!(i32),
Kind::Int64 => quote!(i64),
Expand All @@ -378,7 +379,7 @@ impl ConversionsGenerator {
Kind::Sfixed32 => quote!(i32),
Kind::Sfixed64 => quote!(i64),
Kind::Bool => quote!(bool),
_ => panic!("Map key type not supported"),
_ => panic!("Map key type not supported {:?}", map_key_type),
};
// TODO: Proto name might not be the same as Rust struct name
let rust_struct_name = self.messages.get(map_value_type.name())?.ident.clone();
Expand Down

0 comments on commit c377d7f

Please sign in to comment.