Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeepee committed Nov 3, 2020
1 parent c336fbc commit 7057b6b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions gremlin-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ impl GremlinClient {
Ok(GResultSet::new(self.clone(), results, response, conn))
}

pub fn generate_message(&self, bytecode: &Bytecode) -> GremlinResult<Message<serde_json::Value>> {
pub fn generate_message(
&self,
bytecode: &Bytecode,
) -> GremlinResult<Message<serde_json::Value>> {
let mut args = HashMap::new();

args.insert(String::from("gremlin"), GValue::Bytecode(bytecode.clone()));
Expand All @@ -150,7 +153,11 @@ impl GremlinClient {

let args = self.options.serializer.write(&GValue::from(args))?;

Ok(message_with_args(String::from("bytecode"), String::from("traversal"), args))
Ok(message_with_args(
String::from("bytecode"),
String::from("traversal"),
args,
))
}

pub(crate) fn submit_traversal(&self, bytecode: &Bytecode) -> GremlinResult<GResultSet> {
Expand Down

0 comments on commit 7057b6b

Please sign in to comment.