Skip to content

Commit

Permalink
RFC30: Refactoring blob (#2850)
Browse files Browse the repository at this point in the history
## Motivation and Context
This is a sub-PR of #2615.
Refactors `blob.rs` file.

## Description
Some test was failing due to unnecessary import; This PR fixes it.

## Testing
NA

## Checklist
NA

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
  • Loading branch information
thomas-k-cameron and Velfi authored Dec 20, 2023
1 parent 06e66d1 commit f84f9ba
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rust-runtime/aws-smithy-types/src/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ impl AsRef<[u8]> for Blob {
#[cfg(all(aws_sdk_unstable, feature = "serde-serialize"))]
mod serde_serialize {
use super::*;
use crate::base64;
use serde::Serialize;

impl Serialize for Blob {
Expand All @@ -54,7 +53,6 @@ mod serde_serialize {
#[cfg(all(aws_sdk_unstable, feature = "serde-deserialize"))]
mod serde_deserialize {
use super::*;
use crate::base64;
use serde::{de::Visitor, Deserialize};

struct HumanReadableBlobVisitor;
Expand All @@ -68,7 +66,7 @@ mod serde_deserialize {
where
E: serde::de::Error,
{
match base64::decode(v) {
match crate::base64::decode(v) {
Ok(inner) => Ok(Blob { inner }),
Err(e) => Err(E::custom(e)),
}
Expand Down

0 comments on commit f84f9ba

Please sign in to comment.