Skip to content

Commit 3cf5c55

Browse files
author
Fahad Zubair
committed
Update latest version of aws-smithy-http-server to legacy
1 parent fb75718 commit 3cf5c55

File tree

23 files changed

+96
-97
lines changed

23 files changed

+96
-97
lines changed

rust-runtime/aws-smithy-legacy-http-server/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
name = "aws-smithy-legacy-http-server"
3-
version = "0.65.7"
4-
authors = ["Smithy Legacy Rust Server <[email protected]>"]
3+
version = "0.65.8"
4+
authors = ["Smithy Rust Server <[email protected]>"]
55
edition = "2021"
66
license = "Apache-2.0"
77
repository = "https://github.com/smithy-lang/smithy-rs"
88
keywords = ["smithy", "framework", "web", "api", "aws"]
99
categories = ["asynchronous", "web-programming", "api-bindings"]
1010
description = """
11-
Legacy server runtime for Smithy Rust Server Framework.
11+
Server runtime for Smithy Rust Server Framework.
1212
"""
1313
publish = true
1414

@@ -18,12 +18,12 @@ unredacted-logging = []
1818
request-id = ["dep:uuid"]
1919

2020
[dependencies]
21-
aws-smithy-legacy-http = { path = "../aws-smithy-legacy-http", features = ["rt-tokio", "event-stream"] }
21+
aws-smithy-http = { path = "../aws-smithy-legacy-http", features = ["rt-tokio"], package = "aws-smithy-legacy-http" }
2222
aws-smithy-json = { path = "../aws-smithy-json" }
23-
aws-smithy-cbor = { path = "../aws-smithy-cbor" }
24-
aws-smithy-xml = { path = "../aws-smithy-xml" }
2523
aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["http-02x"] }
2624
aws-smithy-types = { path = "../aws-smithy-types", features = ["http-body-0-4-x", "hyper-0-14-x"] }
25+
aws-smithy-xml = { path = "../aws-smithy-xml" }
26+
aws-smithy-cbor = { path = "../aws-smithy-cbor" }
2727
bytes = "1.10.0"
2828
futures-util = { version = "0.3.29", default-features = false }
2929
http = "0.2.9"

rust-runtime/aws-smithy-legacy-http-server/src/instrumentation/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
//!
1313
//! ```
1414
//! # use std::convert::Infallible;
15-
//! # use aws_smithy_http_server::instrumentation::{*, sensitivity::{*, headers::*, uri::*}};
16-
//! # use aws_smithy_http_server::shape_id::ShapeId;
15+
//! # use aws_smithy_legacy_http_server::instrumentation::{*, sensitivity::{*, headers::*, uri::*}};
16+
//! # use aws_smithy_legacy_http_server::shape_id::ShapeId;
1717
//! # use http::{Request, Response};
1818
//! # use tower::{util::service_fn, Service};
1919
//! # async fn service(request: Request<()>) -> Result<Response<()>, Infallible> {

rust-runtime/aws-smithy-legacy-http-server/src/instrumentation/sensitivity/headers.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub struct HeaderMarker {
3131
/// # Example
3232
///
3333
/// ```
34-
/// # use aws_smithy_http_server::instrumentation::sensitivity::headers::{SensitiveHeaders, HeaderMarker};
34+
/// # use aws_smithy_legacy_http_server::instrumentation::sensitivity::headers::{SensitiveHeaders, HeaderMarker};
3535
/// # use http::header::HeaderMap;
3636
/// # let headers = HeaderMap::new();
3737
/// // Headers with keys equal to "header-name" are sensitive
@@ -190,7 +190,7 @@ mod tests {
190190
let original: HeaderMap = to_header_map(HEADER_MAP);
191191

192192
let output = SensitiveHeaders::new(&original, |_| HeaderMarker::default());
193-
assert_eq!(format!("{:?}", output), format!("{:?}", original));
193+
assert_eq!(format!("{output:?}"), format!("{:?}", original));
194194
}
195195

196196
#[cfg(not(feature = "unredacted-logging"))]
@@ -212,7 +212,7 @@ mod tests {
212212
value: true,
213213
key_suffix: None,
214214
});
215-
assert_eq!(format!("{:?}", output), format!("{:?}", expected));
215+
assert_eq!(format!("{output:?}"), format!("{:?}", expected));
216216
}
217217

218218
#[cfg(not(feature = "unredacted-logging"))]
@@ -234,7 +234,7 @@ mod tests {
234234
value: name == "name-a",
235235
key_suffix: None,
236236
});
237-
assert_eq!(format!("{:?}", output), format!("{:?}", expected));
237+
assert_eq!(format!("{output:?}"), format!("{:?}", expected));
238238
}
239239

240240
#[cfg(not(feature = "unredacted-logging"))]
@@ -261,6 +261,6 @@ mod tests {
261261
None
262262
},
263263
});
264-
assert_eq!(format!("{:?}", output), format!("{:?}", expected));
264+
assert_eq!(format!("{output:?}"), format!("{:?}", expected));
265265
}
266266
}

rust-runtime/aws-smithy-legacy-http-server/src/instrumentation/sensitivity/sensitive.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use super::REDACTED;
2222
/// # Example
2323
///
2424
/// ```
25-
/// # use aws_smithy_http_server::instrumentation::sensitivity::Sensitive;
25+
/// # use aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitive;
2626
/// # let address = "";
2727
/// tracing::debug!(
2828
/// name = %Sensitive("Alice"),
@@ -78,11 +78,11 @@ mod tests {
7878
fn debug() {
7979
let inner = "hello world";
8080
let sensitive = Sensitive(inner);
81-
let actual = format!("{:?}", sensitive);
81+
let actual = format!("{sensitive:?}");
8282
let expected = if cfg!(feature = "unredacted-logging") {
83-
format!("{:?}", inner)
83+
format!("{inner:?}")
8484
} else {
85-
format!("{:?}", REDACTED)
85+
format!("{REDACTED:?}")
8686
};
8787
assert_eq!(actual, expected)
8888
}
@@ -91,7 +91,7 @@ mod tests {
9191
fn display() {
9292
let inner = "hello world";
9393
let sensitive = Sensitive(inner);
94-
let actual = format!("{}", sensitive);
94+
let actual = format!("{sensitive}");
9595
let expected = if cfg!(feature = "unredacted-logging") {
9696
inner.to_string()
9797
} else {

rust-runtime/aws-smithy-legacy-http-server/src/instrumentation/sensitivity/uri/label.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::instrumentation::{sensitivity::Sensitive, MakeFmt};
1818
/// # Example
1919
///
2020
/// ```
21-
/// # use aws_smithy_http_server::instrumentation::sensitivity::uri::Label;
21+
/// # use aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::Label;
2222
/// # use http::Uri;
2323
/// # let path = "";
2424
/// // Path segment 2 is redacted and a trailing greedy label
@@ -42,7 +42,7 @@ pub struct Label<'a, F> {
4242
/// The pattern, `/alpha/beta/{greedy+}/trail`, has segment index 2 and offset from the end of 6.
4343
///
4444
/// ```rust
45-
/// # use aws_smithy_http_server::instrumentation::sensitivity::uri::GreedyLabel;
45+
/// # use aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::GreedyLabel;
4646
/// let greedy_label = GreedyLabel::new(2, 6);
4747
/// ```
4848
#[derive(Clone, Debug)]
@@ -101,7 +101,7 @@ where
101101
if (self.label_marker)(index) {
102102
write!(f, "/{}", Sensitive(segment))?;
103103
} else {
104-
write!(f, "/{}", segment)?;
104+
write!(f, "/{segment}")?;
105105
}
106106
// Add the segment length and the separator to the `greedy_start`.
107107
let greedy_start = greedy_start + segment.len() + 1;
@@ -140,7 +140,7 @@ where
140140
if (self.label_marker)(index) {
141141
write!(f, "/{}", Sensitive(segment))?;
142142
} else {
143-
write!(f, "/{}", segment)?;
143+
write!(f, "/{segment}")?;
144144
}
145145
}
146146
}

rust-runtime/aws-smithy-legacy-http-server/src/instrumentation/sensitivity/uri/query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub struct QueryMarker {
2727
/// # Example
2828
///
2929
/// ```
30-
/// # use aws_smithy_http_server::instrumentation::sensitivity::uri::{Query, QueryMarker};
30+
/// # use aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::{Query, QueryMarker};
3131
/// # let uri = "";
3232
/// // Query string value with key "name" is redacted
3333
/// let uri = Query::new(&uri, |x| QueryMarker { key: false, value: x == "name" } );

rust-runtime/aws-smithy-legacy-http-server/src/instrumentation/service.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ where
8888
/// # Example
8989
///
9090
/// ```
91-
/// # use aws_smithy_http_server::instrumentation::{sensitivity::{*, uri::*, headers::*}, *};
92-
/// # use aws_smithy_http_server::shape_id::ShapeId;
91+
/// # use aws_smithy_legacy_http_server::instrumentation::{sensitivity::{*, uri::*, headers::*}, *};
92+
/// # use aws_smithy_legacy_http_server::shape_id::ShapeId;
9393
/// # use tower::{Service, service_fn};
9494
/// # use http::{Request, Response};
9595
/// # async fn f(request: Request<()>) -> Result<Response<()>, ()> { Ok(Response::new(())) }

rust-runtime/aws-smithy-legacy-http-server/src/layer/alb_health_check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! # Example
1010
//!
1111
//! ```no_run
12-
//! use aws_smithy_http_server::layer::alb_health_check::AlbHealthCheckLayer;
12+
//! use aws_smithy_legacy_http_server::layer::alb_health_check::AlbHealthCheckLayer;
1313
//! use hyper::StatusCode;
1414
//! use tower::Layer;
1515
//!

rust-runtime/aws-smithy-legacy-http-server/src/operation/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
//! is identified with the implementation
2525
//!
2626
//! ```rust,no_run
27-
//! # use aws_smithy_http_server::shape_id::ShapeId;
28-
//! # use aws_smithy_http_server::operation::OperationShape;
27+
//! # use aws_smithy_legacy_http_server::shape_id::ShapeId;
28+
//! # use aws_smithy_legacy_http_server::operation::OperationShape;
2929
//! # pub struct CartIdentifier;
3030
//! # pub struct ShoppingCart;
3131
//! # pub enum GetShoppingError {}
@@ -55,7 +55,7 @@
5555
//! implement [`Handler`]:
5656
//!
5757
//! ```rust,no_run
58-
//! # use aws_smithy_http_server::Extension;
58+
//! # use aws_smithy_legacy_http_server::Extension;
5959
//! # pub struct CartIdentifier;
6060
//! # pub struct ShoppingCart;
6161
//! # pub enum GetShoppingError {}
@@ -101,9 +101,9 @@
101101
//!
102102
//! ```rust,no_run
103103
//! # use std::task::{Poll, Context};
104-
//! # use aws_smithy_http_server::operation::*;
104+
//! # use aws_smithy_legacy_http_server::operation::*;
105105
//! # use tower::Service;
106-
//! # use aws_smithy_http_server::shape_id::ShapeId;
106+
//! # use aws_smithy_legacy_http_server::shape_id::ShapeId;
107107
//! # pub struct CartIdentifier;
108108
//! # pub struct ShoppingCart;
109109
//! # pub enum GetShoppingError {}

rust-runtime/aws-smithy-legacy-http-server/src/plugin/closure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ where
2929
/// # Example
3030
///
3131
/// ```rust
32-
/// # use aws_smithy_http_server::{service::*, operation::OperationShape, plugin::Plugin, shape_id::ShapeId};
32+
/// # use aws_smithy_legacy_http_server::{service::*, operation::OperationShape, plugin::Plugin, shape_id::ShapeId};
3333
/// # pub enum Operation { CheckHealth, GetPokemonSpecies }
3434
/// # impl Operation { fn shape_id(&self) -> ShapeId { ShapeId::new("", "", "") }}
3535
/// # pub struct CheckHealth;
@@ -45,7 +45,7 @@ where
4545
/// # impl OperationShape for GetPokemonSpecies { const ID: ShapeId = ShapeId::new("", "", ""); type Input = (); type Output = (); type Error = (); }
4646
/// # impl ContainsOperation<CheckHealth> for PokemonService { const VALUE: Operation = Operation::CheckHealth; }
4747
/// # impl ContainsOperation<GetPokemonSpecies> for PokemonService { const VALUE: Operation = Operation::GetPokemonSpecies; }
48-
/// use aws_smithy_http_server::plugin::plugin_from_operation_fn;
48+
/// use aws_smithy_legacy_http_server::plugin::plugin_from_operation_fn;
4949
/// use tower::layer::layer_fn;
5050
///
5151
/// struct FooService<S> {

0 commit comments

Comments
 (0)