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)));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
#![warn(clippy::all, rust_2018_idioms)]
|
||||
|
||||
pub mod app;
|
||||
pub mod constants;
|
||||
pub mod custom_code_block;
|
||||
|
||||
@ -140,8 +140,7 @@ impl PxBoundingBox {
|
||||
}
|
||||
|
||||
pub fn is_disjoint_from(&self, other: &PxBoundingBox) -> bool {
|
||||
false
|
||||
|| self.x_from > other.x_to
|
||||
self.x_from > other.x_to
|
||||
|| self.y_from > other.y_to
|
||||
|| other.x_from > self.x_to
|
||||
|| other.y_from > self.y_to
|
||||
|
||||
Reference in New Issue
Block a user