Unverified Commit 78c23de8 authored by Fahad Zubair's avatar Fahad Zubair Committed by GitHub
Browse files

Use re-exported types in examples instead of aws-smithy-types (#3105)



Some of the examples were using types from `aws-smithy-types` instead of
the re-exported ones from the generated SDKs. As a guideline, it is
preferred to use re-exported types rather than directly depending on
underlying crates.

Co-authored-by: default avatarFahad Zubair <fahadzub@amazon.com>
parent 0f1f1a67
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
/// The example can be run using `cargo run --example mock-request`.
///
use aws_smithy_runtime::client::http::test_util::capture_request;
use aws_smithy_types::body::SdkBody;
use pokemon_service_client::primitives::SdkBody;
use pokemon_service_client::Client as PokemonClient;
use pokemon_service_client_usage::{setup_tracing_subscriber, POKEMON_SERVICE_URL};

+0 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@
///
/// The example can be run using `cargo run --example response-header-interceptor`.
///
//use aws_smithy_types::config_bag::{Storable, StoreReplace};
use aws_smithy_types::config_bag::{Storable, StoreReplace};
use pokemon_service_client::{
    config::{
+0 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@
///
/// The example can be run using `cargo run --example use-config-bag`.
///
//use aws_smithy_types::config_bag::{Storable, StoreReplace};
use aws_smithy_types::config_bag::{Storable, StoreReplace};
use pokemon_service_client_usage::{setup_tracing_subscriber, POKEMON_SERVICE_URL};
use std::time::Instant;
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ tower = "0.4"
aws-smithy-runtime = { path = "../../rust-runtime/aws-smithy-runtime", features = ["client", "connector-hyper-0-14-x"] }
aws-smithy-runtime-api = { path = "../../rust-runtime/aws-smithy-runtime-api", features = ["client"] }
aws-smithy-http-server = { path = "../../rust-runtime/aws-smithy-http-server" }
aws-smithy-types = { path = "../../rust-runtime/aws-smithy-types" }
pokemon-service-client = { path = "../pokemon-service-client" }
pokemon-service-server-sdk = { path = "../pokemon-service-server-sdk" }

+4 −2
Original line number Diff line number Diff line
@@ -18,10 +18,12 @@ use async_stream::stream;
use aws_smithy_http_server::Extension;
use aws_smithy_runtime::client::http::hyper_014::HyperConnector;
use aws_smithy_runtime_api::client::http::HttpConnector;
use aws_smithy_types::{body::SdkBody, byte_stream::ByteStream};
use http::Uri;
use pokemon_service_server_sdk::{
    error, input, model, model::CapturingPayload, output, types::Blob,
    error, input, model,
    model::CapturingPayload,
    output,
    types::{Blob, ByteStream, SdkBody},
};
use rand::{seq::SliceRandom, Rng};
use tracing_subscriber::{prelude::*, EnvFilter};
Loading