summary refs log tree commit diff stats
path: root/src/graph.rs
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2023-04-08 22:30:45 -0300
committerSoniEx2 <endermoneymod@gmail.com>2023-04-08 22:30:45 -0300
commit5693d84c79c5a460582f8c1563889970471eebf4 (patch)
treea37d791b2e45b50986e13eac07c21fcaa6e474f8 /src/graph.rs
parent41254c58c9fface69f7db39b5236a7aed319047c (diff)
More clean up
Diffstat (limited to 'src/graph.rs')
-rw-r--r--src/graph.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/graph.rs b/src/graph.rs
index 47d6523..c95cf34 100644
--- a/src/graph.rs
+++ b/src/graph.rs
@@ -8,19 +8,20 @@ use serde::de::Deserialize;
 use crate::vm::MAX_CALLS;
 use crate::vm::Pack;
 use crate::vm::Unpacker;
-use crate::errors::QueryError;
+use crate::errors::UnpackError;
 
 // TODO in the future, we may want to store &'pat IndexSet<String> either here
 // or in the Pack.
+/// Match results. Produced by matching a `Pattern` against a `Deserializer`.
 #[derive(Debug)]
 pub struct Graph<'pat, 'de>(pub(crate) Option<Pack<'pat, 'de>>);
 
 impl<'pat, 'de> Graph<'pat, 'de> {
     /// Collect this graph into a given form.
-    pub fn collect<De: Deserialize<'de>>(self) -> Result<De, QueryError> {
+    pub fn collect<De: Deserialize<'de>>(self) -> Result<De, UnpackError> {
         let Self(inner) = self;
         match inner {
-            None => Err(QueryError::Empty),
+            None => Err(UnpackError::Empty),
             Some(pack) => {
                 let mut unpacker = Unpacker::new(pack, MAX_CALLS);
                 De::deserialize(unpacker)