Address clippy warnings.

This commit is contained in:
Blaž Hrastnik 2021-02-05 11:43:16 +09:00
parent 9c33b5340a
commit 8f0ddf9632
2 changed files with 2 additions and 3 deletions

View file

@ -1,7 +1,6 @@
use crate::theme::Theme;
use crate::tree::Tree;
use crate::{Document, View};
use slotmap::DefaultKey as Key;
use std::path::PathBuf;

View file

@ -24,7 +24,7 @@ pub enum Node {
}
impl Node {
pub fn container(area: Rect) -> Self {
pub fn container() -> Self {
Self::Container(Box::new(Container::new()))
}
@ -59,7 +59,7 @@ pub fn new() -> Self {
impl Tree {
pub fn new(area: Rect) -> Self {
let root = Node::container(area);
let root = Node::container();
let mut nodes = HopSlotMap::new();
let root = nodes.insert(root);