clone, dont serialize

This commit is contained in:
Aiden McClelland
2024-02-17 16:37:43 -07:00
parent 40d9f406d0
commit f7fe1078cd
2 changed files with 3 additions and 11 deletions

View File

@@ -1,7 +1,6 @@
use std::any::TypeId;
use std::collections::VecDeque;
use std::ffi::OsString;
use std::time::Duration;
use clap::{CommandFactory, FromArgMatches};
use imbl_value::Value;
@@ -13,7 +12,7 @@ use tokio::io::{AsyncBufReadExt, AsyncRead, AsyncWrite, AsyncWriteExt, BufReader
use url::Url;
use yajrc::{Id, RpcError};
use crate::util::{internal_error, parse_error, Flat, PhantomData};
use crate::util::{internal_error, parse_error, PhantomData};
use crate::{
AnyHandler, CliBindingsAny, DynHandler, HandleAny, HandleAnyArgs, Handler, HandlerArgs,
HandlerArgsFor, HandlerTypes, IntoContext, Name, ParentHandler, PrintCliResult,
@@ -226,11 +225,7 @@ where
.collect::<Vec<_>>();
match handle_args
.context
.call_remote(
&full_method.join("."),
imbl_value::to_value(&Flat(handle_args.params, handle_args.inherited_params))
.map_err(parse_error)?,
)
.call_remote(&full_method.join("."), handle_args.raw_params.clone())
.await
{
Ok(a) => imbl_value::from_value(a)

View File

@@ -500,10 +500,7 @@ where
EitherContext::C1(context) => {
let full_method = parent_method.into_iter().chain(method).collect::<Vec<_>>();
match context
.call_remote(
&full_method.join("."),
imbl_value::to_value(&raw_params).map_err(parse_error)?,
)
.call_remote(&full_method.join("."), raw_params.clone())
.await
{
Ok(a) => imbl_value::from_value(a)