aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-05-03 18:20:24 +0000
committermat <github@matdoes.dev>2022-05-03 18:20:24 +0000
commitc9878129274258a30dc3ee0ecbd064b4fcf9bc6e (patch)
tree07e03b13eb71b4231159d42b5773e31371e83858 /azalea-world/src
parent477c367fc44a2b5c139845f7e8307c6c276d95ee (diff)
downloadazalea-drasl-c9878129274258a30dc3ee0ecbd064b4fcf9bc6e.tar.xz
clippy
Diffstat (limited to 'azalea-world/src')
-rw-r--r--azalea-world/src/palette.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/azalea-world/src/palette.rs b/azalea-world/src/palette.rs
index a8ec50c9..69900fe6 100644
--- a/azalea-world/src/palette.rs
+++ b/azalea-world/src/palette.rs
@@ -35,9 +35,9 @@ impl McBufWritable for PalettedContainer {
pub enum Palette {
/// ID of the corresponding entry in its global palette
SingleValue(u32),
- LinearPalette(Vec<u32>),
- HashmapPalette(Vec<u32>),
- GlobalPalette,
+ Linear(Vec<u32>),
+ Hashmap(Vec<u32>),
+ Global,
}
impl Palette {
@@ -47,9 +47,9 @@ impl Palette {
) -> Result<Palette, String> {
Ok(match bits_per_entry {
0 => Palette::SingleValue(u32::read_into(buf)?),
- 1..=4 => Palette::LinearPalette(Vec::<u32>::read_into(buf)?),
- 5..=8 => Palette::HashmapPalette(Vec::<u32>::read_into(buf)?),
- _ => Palette::GlobalPalette,
+ 1..=4 => Palette::Linear(Vec::<u32>::read_into(buf)?),
+ 5..=8 => Palette::Hashmap(Vec::<u32>::read_into(buf)?),
+ _ => Palette::Global,
})
}
}
@@ -60,13 +60,13 @@ impl McBufWritable for Palette {
Palette::SingleValue(value) => {
value.write_into(buf)?;
}
- Palette::LinearPalette(values) => {
+ Palette::Linear(values) => {
values.write_into(buf)?;
}
- Palette::HashmapPalette(values) => {
+ Palette::Hashmap(values) => {
values.write_into(buf)?;
}
- Palette::GlobalPalette => {}
+ Palette::Global => {}
}
Ok(())
}