-
Notifications
You must be signed in to change notification settings - Fork 337
Conversation
1453536
to
554cfb9
Compare
src/kv/bulk.rs
Outdated
@@ -0,0 +1,67 @@ | |||
extern crate base64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the point of extern crate
? that was deprecated in rust 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk! i thought i had dropped this but it maybe snuck back in? can update
src/kv/bulk.rs
Outdated
bulk_key_value_pairs: pairs.to_owned(), | ||
}) { | ||
Ok(_) => Ok(()), | ||
Err(e) => failure::bail!("{}", kv::format_error(e)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in another section, we imported this and just called format_error
- lets make em consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh i hate that this is hereeeeeeeee next stop thiserror
src/kv/bulk.rs
Outdated
|
||
match response { | ||
Ok(_) => Ok(()), | ||
Err(e) => failure::bail!("{}", kv::format_error(e)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -9,7 +9,7 @@ use std::path::PathBuf; | |||
|
|||
use serde::{Deserialize, Serialize}; | |||
|
|||
#[derive(Clone, Debug, Deserialize, Serialize)] | |||
#[derive(Clone, Debug, Default, Deserialize, Serialize)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do we use Default
for? what is a Default
target?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this snuck in while i was doing some work with prototyping on the deployments project. all a default here would be is each field would be set to its type's default -- empty String
, None
for Option
, etc. deriving this here is just a convenience, i can leave it or not.
this looks like a nightmare, and that's a little bit because it is. but this gets most of the separation of concerns between kv implementation and the commands, as well as giving site specific logic its own home.