Skip to content
Snippets Groups Projects
Verified Commit d888156d authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

refactor: small code tune

parent 557ca0fd
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ use crate::{ ...@@ -13,7 +13,7 @@ use crate::{
use wasm_bindgen::prelude::*; use wasm_bindgen::prelude::*;
#[cfg(feature = "wasm")] #[cfg(feature = "wasm")]
use crate::ppu::Palette; use crate::ppu::{Pixel, Palette};
#[cfg(feature = "wasm")] #[cfg(feature = "wasm")]
use std::{ use std::{
...@@ -259,7 +259,7 @@ impl GameBoy { ...@@ -259,7 +259,7 @@ impl GameBoy {
let palette: Palette = value let palette: Palette = value
.into_iter() .into_iter()
.map(|v| self.convert_value(&v)) .map(|v| self.convert_value(&v))
.collect::<Vec<[u8; 3]>>() .collect::<Vec<Pixel>>()
.try_into() .try_into()
.unwrap(); .unwrap();
self.ppu().set_palette_colors(&palette); self.ppu().set_palette_colors(&palette);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment