Skip to content

Commit f0bb837

Browse files
committed
Remove Tag from exposed type
1 parent 92ce901 commit f0bb837

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

aws/rust-runtime/aws-config/src/sts/assume_role.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,17 @@ impl AssumeRoleProviderBuilder {
204204
///
205205
/// A list of session tags that you want to pass. Each session tag consists of a key name and an associated value.
206206
/// For more information, see `[Tag]`.
207-
pub fn tags(mut self, tags: impl Into<Vec<Tag>>) -> Self {
208-
self.tags = Some(tags.into());
207+
pub fn tags<K, V>(mut self, tags: impl IntoIterator<Item = (K, V)>) -> Self
208+
where
209+
K: Into<String>,
210+
V: Into<String>{
211+
self.tags = Some(
212+
tags.into_iter()
213+
// Unwrap won't fail as both key and value are specified.
214+
// Currently Tag does not have an infallible build method.
215+
.map(|(k, v)| Tag::builder().key(k).value(v).build().unwrap())
216+
.collect::<Vec<_>>(),
217+
);
209218
self
210219
}
211220

0 commit comments

Comments
 (0)