RFC30: Refactoring blob (#2850)

## Motivation and Context
This is a sub-PR of https://github.com/awslabs/smithy-rs/pull/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>
This commit is contained in:
Thomas Cameron 2023-12-21 03:12:51 +09:00 committed by GitHub
parent 06e66d191c
commit f84f9ba8fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -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 {
@ -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;
@ -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)),
}