Vincent Batts
|
5e4c3dc119
|
found a solution to print the Type (T) of a variable
https://stackoverflow.com/a/58119924
|
2023-01-23 11:21:33 -05:00 |
Vincent Batts
|
0e3e60b23e
|
into_iter() on vec
|
2023-01-23 11:14:33 -05:00 |
Vincent Batts
|
6eb958eb56
|
iter on vec
|
2023-01-23 11:14:03 -05:00 |
Vincent Batts
|
315bc1853f
|
Library! Thanks to abcrawf. I was too much in the weeds using the compiler help output
|
2023-01-22 14:35:02 -05:00 |
Vincent Batts
|
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 |
Vincent Batts
|
3c73ea8d73
|
playing with `vec!`, push, pop, and iter
|
2023-01-19 13:31:04 -05:00 |
Vincent Batts
|
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 |
Vincent Batts
|
d2bc5d2981
|
lifetimes and returning borrowed values. Also print pointer address
|
2023-01-18 21:14:01 -05:00 |
Vincent Batts
|
c5ebaa16dd
|
messing around with borrowing and mutability
|
2023-01-18 20:24:43 -05:00 |
Vincent Batts
|
7402a7ec82
|
borrowing and references on Point
|
2023-01-17 15:05:14 -05:00 |
Vincent Batts
|
ba8a489a3b
|
copying and owners
|
2023-01-17 15:01:07 -05:00 |
Vincent Batts
|
ecf2317a5b
|
here is with reference, so it can be called more than once
|
2023-01-16 19:31:09 -05:00 |
Vincent Batts
|
b0c18ed28b
|
this works, but without reference, this moves ownership so can only be
called once
|
2023-01-16 19:30:11 -05:00 |
Vincent Batts
|
6ea43cb35f
|
single owner. borrowed references are "moved"
|
2023-01-16 19:12:42 -05:00 |
Vincent Batts
|
1322bfd957
|
scopes and shadowing
|
2023-01-16 15:42:12 -05:00 |
Vincent Batts
|
319948a16e
|
global static. It is immutable
|
2023-01-16 11:49:43 -05:00 |
Vincent Batts
|
1eff21e93e
|
oh neat. A three bit digest. The const's are inlined once used
|
2023-01-15 16:07:14 -05:00 |
Vincent Batts
|
ceda46b8d1
|
inferring, but then attempting to convert integer types
|
2023-01-15 14:55:55 -05:00 |
Vincent Batts
|
70ca7bb74d
|
inferring types
|
2023-01-15 14:52:11 -05:00 |
Vincent Batts
|
baec55b750
|
matrices and transposing. Also compiling dead code
|
2023-01-15 14:36:15 -05:00 |
Vincent Batts
|
4247c43b1b
|
for range over the array, rather than index
|
2023-01-14 21:12:23 -05:00 |
Vincent Batts
|
5540cb62c4
|
oh good, the .into() can be added even if the type already matches
|
2023-01-14 21:09:13 -05:00 |
Vincent Batts
|
773b9cbafb
|
glad to see 'implicit' conversions are now explicit as of rust 1.66.1
|
2023-01-14 20:57:36 -05:00 |
Vincent Batts
|
45a76f19ff
|
function with generic parameters
|
2023-01-14 20:23:04 -05:00 |
Vincent Batts
|
f7e268c839
|
methods on a struct
|
2023-01-14 16:04:26 -05:00 |
Vincent Batts
|
bb36d8fe90
|
fizzbuzz interview question
|
2023-01-14 15:37:45 -05:00 |
Vincent Batts
|
a3136725b5
|
String buffer and immutable ref to a string slice
|
2023-01-14 15:21:59 -05:00 |
Vincent Batts
|
4518c489dc
|
immutable slice and borrowed slice
|
2023-01-14 15:16:11 -05:00 |
Vincent Batts
|
de5218c5dd
|
oh interesting. Dangling reference not allowed.
```
error[E0597]: `x` does not live long enough
```
|
2023-01-14 15:08:36 -05:00 |
Vincent Batts
|
0a2003dfc8
|
playing with the mutable references
|
2023-01-14 14:44:29 -05:00 |
Vincent Batts
|
62b4865c9c
|
references
|
2023-01-14 13:59:47 -05:00 |
Vincent Batts
|
aaa0c9143e
|
compound types
|
2023-01-14 13:57:39 -05:00 |