Skip to content

Commit 104797d

Browse files
drganjooFahad Zubair
and
Fahad Zubair
authored
Add missing lifetime annotation to EscapedStr::as_escaped_str (#3920)
`JsonTokenIterator` parses and returns `Token`s from a provided u8 slice. `EscapedStr` is used as a member field in several token variants, such as `ObjectKey` and `ValueString`. While `as_escaped_str` returns a reference to the underlying `&'a str`, the lifetime annotation was missing from its return type. This PR adds the missing lifetime annotation. Co-authored-by: Fahad Zubair <[email protected]>
1 parent 422d9ef commit 104797d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rust-runtime/aws-smithy-json/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aws-smithy-json"
3-
version = "0.60.7"
3+
version = "0.61.1"
44
authors = ["AWS Rust SDK Team <[email protected]>", "John DiSanti <[email protected]>"]
55
description = "Token streaming JSON parser for smithy-rs."
66
edition = "2021"

rust-runtime/aws-smithy-json/src/deserialize/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl<'a> EscapedStr<'a> {
2525
}
2626

2727
/// Returns the escaped string value
28-
pub fn as_escaped_str(&self) -> &str {
28+
pub fn as_escaped_str(&self) -> &'a str {
2929
self.0
3030
}
3131

0 commit comments

Comments
 (0)