2022/05/03
aws policy documents can change the order of items within permissions arrays, but that’s safe to ignore:
- Order is lost for data
aws_iam_policy_document - Policy elements that are syntactically lists but semantically sets should have their order ignored
- Perpetual diffs / Objects have changed outside of Terraform tracking ticket
Also, that & types take 8 bytes = 64 bits on 64-bit systems
use std::mem;
pub struct Foo {
bar: String, // 24
baz: usize, // 8
}
pub struct Quux<'a> {
foo: &'a Foo,
bar: usize,
}
fn main() {
println!("Foo: {}", mem::size_of::<Foo>()); // 32
println!("&Foo: {}", mem::size_of::<&Foo>()); // 8 -- a pointer?
println!("Quux: {}", mem::size_of::<Quux>()); // 16 -- a pointer + a usize!
println!("&Quux: {}", mem::size_of::<&Quux>()); // 8 -- another pointer
}