mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-19 22:52:32 +00:00
fix some warnings
This commit is contained in:
parent
3702b2cb21
commit
df167a5a39
4 changed files with 7 additions and 5 deletions
|
@ -26,7 +26,7 @@ pub fn generate(input: &DeclareMenus) -> TokenStream {
|
|||
name_snake_case.span(),
|
||||
);
|
||||
let enum_name = Ident::new(
|
||||
&format!("{}MenuLocation", variant_name),
|
||||
&format!("{variant_name}MenuLocation"),
|
||||
variant_name.span(),
|
||||
);
|
||||
menu_location_variants.extend(quote! {
|
||||
|
|
|
@ -406,13 +406,13 @@ fn generate_menu_consts(menu: &Menu) -> TokenStream {
|
|||
|
||||
if field.length == 1 {
|
||||
let field_name = Ident::new(
|
||||
format!("{}_SLOT", field_name_start).as_str(),
|
||||
format!("{field_name_start}_SLOT").as_str(),
|
||||
field.name.span(),
|
||||
);
|
||||
menu_consts.extend(quote! { pub const #field_name: usize = #field_index_start; });
|
||||
} else {
|
||||
let field_name = Ident::new(
|
||||
format!("{}_SLOTS", field_name_start).as_str(),
|
||||
format!("{field_name_start}_SLOTS").as_str(),
|
||||
field.name.span(),
|
||||
);
|
||||
menu_consts.extend(quote! { pub const #field_name: RangeInclusive<usize> = #field_index_start..=#field_index_end; });
|
||||
|
|
|
@ -3,6 +3,8 @@ pub trait MaxStackSizeExt {
|
|||
///
|
||||
/// This is a signed integer to be consistent with the `count` field of
|
||||
/// [`ItemSlotData`].
|
||||
///
|
||||
/// [`ItemSlotData`]: crate::ItemSlotData
|
||||
fn max_stack_size(&self) -> i8;
|
||||
|
||||
/// Whether this item can be stacked with other items.
|
||||
|
|
|
@ -25,8 +25,8 @@ pub trait ContainerClientExt {
|
|||
}
|
||||
|
||||
impl ContainerClientExt for Client {
|
||||
/// Open a container in the world, like a chest. Use [`Client::inventory`]
|
||||
/// to open your own inventory.
|
||||
/// Open a container in the world, like a chest. Use
|
||||
/// [`Client::open_inventory`] to open your own inventory.
|
||||
///
|
||||
/// ```
|
||||
/// # use azalea::prelude::*;
|
||||
|
|
Loading…
Reference in a new issue