Tidy up path handling in document_file (#464)

* Tidy up path handling in document_file

+ Improve #455

* Cargo Clippy lints

* Rename to_vec to map_to_vec

Co-authored-by: Oliver Davies <oliver@psyfer.io>
This commit is contained in:
TrueDoctor
2022-01-06 19:15:08 -08:00
committed by GitHub
co-authored by Oliver Davies
parent f4707f9b74
commit c1c7192948
6 changed files with 38 additions and 63 deletions
@@ -8,7 +8,6 @@ use graphene::Operation as DocumentOperation;
use graphene::document::Document as GrapheneDocument;
use graphene::layers::style::ViewMode;
use serde::{Deserialize, Serialize};
use std::collections::{HashMap, VecDeque};
#[impl_message(Message, DocumentMessage, Overlay)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
@@ -26,7 +25,6 @@ impl From<DocumentOperation> for OverlayMessage {
#[derive(Debug, Clone, Default)]
pub struct OverlayMessageHandler {
pub overlays_graphene_document: GrapheneDocument,
overlay_path_mapping: HashMap<Vec<LayerId>, Vec<LayerId>>,
}
impl MessageHandler<OverlayMessage, (&mut LayerMetadata, &Document, &InputPreprocessor)> for OverlayMessageHandler {