Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Remove ARN from root_user.
  • Loading branch information
dacut committed Sep 18, 2022
1 parent fe3aad2 commit c0c3025
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion principal/src/principal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ mod test {
assert_ne!(p1a, p2);
assert_eq!(p1a, p1a.clone());

assert_eq!(p1a.to_string(), "arn:aws:iam::123456789012:root");
assert_eq!(p1a.to_string(), "123456789012");
assert_eq!(p1a.source(), PrincipalSource::Aws);
assert!(p1a.has_arn());

Expand Down
6 changes: 3 additions & 3 deletions principal/src/root_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl From<&RootUser> for Arn {

impl Display for RootUser {
fn fmt(&self, f: &mut Formatter) -> FmtResult {
write!(f, "arn:{}:iam::{}:root", self.partition, self.account_id)
write!(f, "{}", self.account_id)
}
}

Expand Down Expand Up @@ -125,8 +125,8 @@ mod tests {
assert_ne!(r1a, r2);
assert_eq!(r1a, r1a.clone());

assert_eq!(r1a.to_string(), "arn:aws:iam::123456789012:root");
assert_eq!(r2.to_string(), "arn:aws:iam::123456789099:root");
assert_eq!(r1a.to_string(), "123456789012");
assert_eq!(r2.to_string(), "123456789099");

let arn1a: Arn = (&r1a).into();

Expand Down

0 comments on commit c0c3025

Please sign in to comment.