Fix clippy
This commit is contained in:
@ -76,13 +76,13 @@ enum FileEvent {
|
||||
|
||||
#[derive(serde::Deserialize, serde::Serialize)]
|
||||
pub enum BufferItem {
|
||||
Text(MdTextEdit),
|
||||
Text(Box<MdTextEdit>),
|
||||
Handwriting(Box<Handwriting>),
|
||||
}
|
||||
|
||||
impl FileEditor {
|
||||
pub fn new(title: impl Into<String>) -> Self {
|
||||
let buffer = vec![BufferItem::Text(MdTextEdit::new())];
|
||||
let buffer = vec![BufferItem::Text(Box::new(MdTextEdit::new()))];
|
||||
Self {
|
||||
title: title.into(),
|
||||
path: None,
|
||||
@ -404,7 +404,7 @@ impl From<&str> for FileEditor {
|
||||
_ => {
|
||||
let mut text_edit = MdTextEdit::new();
|
||||
text_edit.text.push_str(text);
|
||||
buffer.push(BufferItem::Text(text_edit));
|
||||
buffer.push(BufferItem::Text(Box::new(text_edit)));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user