diff options
| author | mat <github@matdoes.dev> | 2022-05-03 18:20:24 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-03 18:20:24 +0000 |
| commit | c9878129274258a30dc3ee0ecbd064b4fcf9bc6e (patch) | |
| tree | 07e03b13eb71b4231159d42b5773e31371e83858 /azalea-world/src | |
| parent | 477c367fc44a2b5c139845f7e8307c6c276d95ee (diff) | |
| download | azalea-drasl-c9878129274258a30dc3ee0ecbd064b4fcf9bc6e.tar.xz | |
clippy
Diffstat (limited to 'azalea-world/src')
| -rw-r--r-- | azalea-world/src/palette.rs | 18 |
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(()) } |
