Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Refactor JSON deserialization to assist code generation #474

Merged
merged 9 commits into from
Jun 11, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ data class RuntimeType(val name: String?, val dependency: RustDependency?, val n
fun Base64Encode(runtimeConfig: RuntimeConfig): RuntimeType =
RuntimeType(
"encode",
CargoDependency.SmithyHttp(runtimeConfig),
"${runtimeConfig.cratePrefix}_http::base64"
CargoDependency.SmithyTypes(runtimeConfig),
"${runtimeConfig.cratePrefix}_types::base64"
)

fun Base64Decode(runtimeConfig: RuntimeConfig): RuntimeType =
RuntimeType(
"decode",
CargoDependency.SmithyHttp(runtimeConfig),
"${runtimeConfig.cratePrefix}_http::base64"
CargoDependency.SmithyTypes(runtimeConfig),
"${runtimeConfig.cratePrefix}_types::base64"
)

fun TimestampFormat(runtimeConfig: RuntimeConfig, format: TimestampFormatTrait.Format): RuntimeType {
Expand Down
3 changes: 1 addition & 2 deletions rust-runtime/inlineable/src/blob_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

use serde::de::{Error, Unexpected};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use smithy_http::base64;
use smithy_types::Blob;
use smithy_types::{base64, Blob};

pub struct BlobSer<'a>(pub &'a Blob);

Expand Down
1 change: 0 additions & 1 deletion rust-runtime/smithy-http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ tokio-util = { version = "0.6", optional = true}

[dev-dependencies]
proptest = "1"
base64 = "0.13.0"
tokio = {version = "1.6", features = ["macros", "rt", "fs", "io-util"]}
tokio-stream = "0.1.5"
tempfile = "3.2.0"
Expand Down
1 change: 0 additions & 1 deletion rust-runtime/smithy-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#![cfg_attr(docsrs, feature(doc_cfg))]

pub mod base64;
pub mod body;
pub mod byte_stream;
pub mod endpoint;
Expand Down
Loading