mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 05:47:19 +02:00
🐛 Remove children correctly
This commit is contained in:
parent
82cf474863
commit
953db56a0d
4 changed files with 13 additions and 14 deletions
|
@ -56,6 +56,12 @@ pub fn bytes() -> Vec<u8> {
|
|||
.map_or_else(|| panic!("Buffer is not initialized"), |buffer| *buffer)
|
||||
}
|
||||
|
||||
pub fn bytes_or_empty() -> Vec<u8> {
|
||||
let mut guard = BUFFERU8.lock().unwrap();
|
||||
|
||||
guard.take().map_or_else(|| Vec::new(), |buffer| *buffer)
|
||||
}
|
||||
|
||||
pub trait SerializableResult {
|
||||
type BytesType;
|
||||
fn from_bytes(bytes: Self::BytesType) -> Self;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue