summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-04-04 16:34:57 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-04-04 16:34:57 +0200
commit3bcfe28b7984a14e468ffaa821f127941f9494c4 (patch)
treee622ff029ff380eedb6a3fab061b085b8b9614c1
parenteb97bc51071d339003c265b1963834ee95204e26 (diff)
Remove unused variables, imports
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--src/async_dag.rs14
-rw-r--r--src/dag_backend.rs9
2 files changed, 6 insertions, 17 deletions
diff --git a/src/async_dag.rs b/src/async_dag.rs
index 651b91d..1566e72 100644
--- a/src/async_dag.rs
+++ b/src/async_dag.rs
@@ -215,12 +215,8 @@ impl<'a, Id, N, Backend> futures::stream::Stream for Stream<'a, Id, N, Backend>
#[cfg(test)]
mod tests {
- use std::pin::Pin;
use anyhow::Result;
- use anyhow::anyhow;
- use async_trait::async_trait;
- use tokio_test::block_on;
use futures::StreamExt;
use crate::DagBackend;
@@ -334,7 +330,7 @@ mod tests {
let id = tokio_test::block_on(dag.update_head(new_head));
assert!(id.is_ok());
- let id = id.unwrap();
+ let _ = id.unwrap();
assert_eq!(dag.backend.0.read().unwrap().len(), 2);
assert_eq!(dag.head, test::Id(1));
@@ -372,7 +368,7 @@ mod tests {
let id = tokio_test::block_on(dag.update_head(new_head));
assert!(id.is_ok());
- let id = id.unwrap();
+ let _ = id.unwrap();
assert_eq!(dag.backend.0.read().unwrap().len(), 2);
assert_eq!(dag.head, test::Id(1));
@@ -407,7 +403,7 @@ mod tests {
let id = tokio_test::block_on(dag.update_head(new_head));
assert!(id.is_ok());
- let id = id.unwrap();
+ let _ = id.unwrap();
assert_eq!(dag.backend.0.read().unwrap().len(), 2);
assert_eq!(dag.head, test::Id(1));
@@ -423,7 +419,7 @@ mod tests {
let id = tokio_test::block_on(branched.update_head(new_head));
assert!(id.is_ok());
- let id = id.unwrap();
+ let _ = id.unwrap();
assert_eq!(branched.backend.0.read().unwrap().len(), 3);
assert_eq!(branched.head, test::Id(2));
@@ -441,7 +437,7 @@ mod tests {
let merge = tokio_test::block_on(dag.merge(&branched, M));
assert!(merge.is_ok());
- let merge = merge.unwrap();
+ let _ = merge.unwrap();
assert_eq!(dag.backend.0.read().unwrap().len(), 4);
assert_eq!(dag.head, test::Id(3));
diff --git a/src/dag_backend.rs b/src/dag_backend.rs
index bfc75f8..b3077c4 100644
--- a/src/dag_backend.rs
+++ b/src/dag_backend.rs
@@ -37,13 +37,6 @@ pub trait DagBackend<Id, N>
#[cfg(test)]
mod tests {
- use std::pin::Pin;
-
- use anyhow::Result;
- use anyhow::anyhow;
- use async_trait::async_trait;
- use tokio_test::block_on;
-
use crate::test_impl as test;
use crate::*;
@@ -72,7 +65,7 @@ mod tests {
data: 0,
})]);
- let id = tokio_test::block_on(b.put({
+ let _ = tokio_test::block_on(b.put({
test::Node {
parents: vec![],
data: 1,