diff --git a/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/src/main.rs b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/src/main.rs index d5b1692..47fedc5 100755 --- a/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/src/main.rs +++ b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/src/main.rs @@ -6,8 +6,8 @@ struct Rectangle { // ANCHOR: here impl Rectangle { - fn square(size: u32) -> Rectangle { - Rectangle { + fn square(size: u32) -> Self { + Self { width: size, height: size, } diff --git a/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/CACHEDIR.TAG b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/CACHEDIR.TAG new file mode 100644 index 0000000..20d7c31 --- /dev/null +++ b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/CACHEDIR.TAG @@ -0,0 +1,3 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by cargo. +# For information about cache directory tags see https://bford.info/cachedir/ diff --git a/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/CACHEDIR.TAG b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/CACHEDIR.TAG new file mode 100644 index 0000000..20d7c31 --- /dev/null +++ b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/CACHEDIR.TAG @@ -0,0 +1,3 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by cargo. +# For information about cache directory tags see https://bford.info/cachedir/ diff --git a/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/debug/.cargo-lock b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/debug/.cargo-lock new file mode 100644 index 0000000..e69de29 diff --git a/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/debug/.fingerprint/rectangles-6066a8348ac7f40b/invoked.timestamp b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/debug/.fingerprint/rectangles-6066a8348ac7f40b/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/debug/.fingerprint/rectangles-6066a8348ac7f40b/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/debug/.fingerprint/rectangles-937cd89110303d07/invoked.timestamp b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/debug/.fingerprint/rectangles-937cd89110303d07/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/debug/.fingerprint/rectangles-937cd89110303d07/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/debug/incremental/rectangles-2as79s7g9rucu/s-gcqq22m2rv-kx4l9d.lock b/listings/ch05-using-structs-to-structure-related-data/no-listing-03-associated-functions/target/rls/debug/incremental/rectangles-2as79s7g9rucu/s-gcqq22m2rv-kx4l9d.lock new file mode 100644 index 0000000..e69de29