Skip to content

Instantly share code, notes, and snippets.

View leftwo's full-sized avatar

Alan Hanson leftwo

View GitHub Profile
@ahl
ahl / gist:cc69a6b267bc04ec48a7dca1b9630578
Created August 24, 2022 21:25
rust for rustaceans (what I learned)
Rust for rustaceans
Ch 1
Uses of multiple lifetime bounds within a single function or type eg a string split iterator
Ch 2
Use trait associated types rather than trait genetics except if you expect multiple implementations of the trait for a given type
You can use impl trait as the value for an associated type and the compiler will infer the specific type from use eg the return from IntoIterator::into_iter()
let g:ycm_language_server =
\ [
\ {