Commit graph

29 commits

Author SHA1 Message Date
77cefee5fb struggling to get this library example compiled :-\
https://google.github.io/comprehensive-rust/exercises/day-1/book-library.html
2023-01-21 10:42:11 -05:00
3c73ea8d73 playing with vec!, push, pop, and iter 2023-01-19 13:31:04 -05:00
95f52e96d3 Lifetimes in Data Structures
https://google.github.io/comprehensive-rust/ownership/lifetimes-data-structures.html

when possible, data structures ought to own their data directly, rather
than borrowing a reference.
2023-01-19 13:08:29 -05:00
d2bc5d2981 lifetimes and returning borrowed values. Also print pointer address 2023-01-18 21:14:01 -05:00
c5ebaa16dd messing around with borrowing and mutability 2023-01-18 20:24:43 -05:00
7402a7ec82 borrowing and references on Point 2023-01-17 15:05:14 -05:00
2a22cdcd51 cloning and owners 2023-01-17 15:01:37 -05:00
ba8a489a3b copying and owners 2023-01-17 15:01:07 -05:00
ecf2317a5b here is with reference, so it can be called more than once 2023-01-16 19:31:09 -05:00
b0c18ed28b this works, but without reference, this moves ownership so can only be
called once
2023-01-16 19:30:11 -05:00
6ea43cb35f single owner. borrowed references are "moved" 2023-01-16 19:12:42 -05:00
1322bfd957 scopes and shadowing 2023-01-16 15:42:12 -05:00
319948a16e global static. It is immutable 2023-01-16 11:49:43 -05:00
1eff21e93e oh neat. A three bit digest. The const's are inlined once used 2023-01-15 16:07:14 -05:00
ceda46b8d1 inferring, but then attempting to convert integer types 2023-01-15 14:55:55 -05:00
70ca7bb74d inferring types 2023-01-15 14:52:11 -05:00
baec55b750 matrices and transposing. Also compiling dead code 2023-01-15 14:36:15 -05:00
4247c43b1b for range over the array, rather than index 2023-01-14 21:12:23 -05:00
5540cb62c4 oh good, the .into() can be added even if the type already matches 2023-01-14 21:09:13 -05:00
773b9cbafb glad to see 'implicit' conversions are now explicit as of rust 1.66.1 2023-01-14 20:57:36 -05:00
45a76f19ff function with generic parameters 2023-01-14 20:23:04 -05:00
f7e268c839 methods on a struct 2023-01-14 16:04:26 -05:00
bb36d8fe90 fizzbuzz interview question 2023-01-14 15:37:45 -05:00
a3136725b5 String buffer and immutable ref to a string slice 2023-01-14 15:21:59 -05:00
4518c489dc immutable slice and borrowed slice 2023-01-14 15:16:11 -05:00
de5218c5dd oh interesting. Dangling reference not allowed.
```
error[E0597]: `x` does not live long enough
```
2023-01-14 15:08:36 -05:00
0a2003dfc8 playing with the mutable references 2023-01-14 14:44:29 -05:00
62b4865c9c references 2023-01-14 13:59:47 -05:00
aaa0c9143e compound types 2023-01-14 13:57:39 -05:00