mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
♻️ Refactor mutability modifiers in wasm
This commit is contained in:
parent
f0f01af55c
commit
3d374e8e97
12 changed files with 155 additions and 131 deletions
|
@ -1,6 +1,6 @@
|
|||
use crate::skia::Image;
|
||||
use crate::uuid::Uuid;
|
||||
use crate::with_state;
|
||||
use crate::with_state_mut;
|
||||
use crate::STATE;
|
||||
use std::collections::HashSet;
|
||||
|
||||
|
@ -24,10 +24,10 @@ pub fn uuid_from_u32(id: [u32; 4]) -> Uuid {
|
|||
}
|
||||
|
||||
pub fn get_image(image_id: &Uuid) -> Option<&Image> {
|
||||
with_state!(state, { state.render_state().images.get(image_id) })
|
||||
with_state_mut!(state, { state.render_state_mut().images.get(image_id) })
|
||||
}
|
||||
|
||||
// FIXME: move to a different place ?
|
||||
pub fn get_fallback_fonts() -> &'static HashSet<String> {
|
||||
with_state!(state, { state.render_state().fonts().get_fallback() })
|
||||
with_state_mut!(state, { state.render_state().fonts().get_fallback() })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue