diff --git a/lib/src/sql/statements/define.rs b/lib/src/sql/statements/define.rs index 90eb6225..63930d1e 100644 --- a/lib/src/sql/statements/define.rs +++ b/lib/src/sql/statements/define.rs @@ -31,7 +31,6 @@ use rand::rngs::OsRng; use rand::Rng; use serde::{Deserialize, Serialize}; use std::fmt; -use std::sync::Arc; #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Store)] pub enum DefineStatement { @@ -608,7 +607,7 @@ impl DefineTableStatement { what: Values(vec![Value::Table(v.clone())]), ..UpdateStatement::default() }; - Arc::new(stm).compute(ctx, opt, txn, doc).await?; + stm.compute(ctx, opt, txn, doc).await?; } } // Ok all good @@ -981,7 +980,7 @@ impl DefineIndexStatement { what: Values(vec![Value::Table(self.what.clone().into())]), ..UpdateStatement::default() }; - Arc::new(stm).compute(ctx, opt, txn, doc).await?; + stm.compute(ctx, opt, txn, doc).await?; // Ok all good Ok(Value::None) } diff --git a/lib/src/sql/value/get.rs b/lib/src/sql/value/get.rs index c203b5f2..dc74f6cb 100644 --- a/lib/src/sql/value/get.rs +++ b/lib/src/sql/value/get.rs @@ -9,7 +9,6 @@ use crate::sql::statements::select::SelectStatement; use crate::sql::value::{Value, Values}; use async_recursion::async_recursion; use futures::future::try_join_all; -use std::sync::Arc; impl Value { #[cfg_attr(feature = "parallel", async_recursion)] @@ -78,8 +77,7 @@ impl Value { what: Values(vec![Value::Thing(v.clone())]), ..SelectStatement::default() }; - Arc::new(stm) - .compute(ctx, opt, txn, None) + stm.compute(ctx, opt, txn, None) .await? .first() .get(ctx, opt, txn, path)