head: 0atman:branch-name-with-your-changes assignee: 0atman base: local-branch-name-on-this-repo draft: true issue: linked issue url? reviewers:
- 0atman
- user2
- user3
| #![allow(dead_code, unused_variables)] | |
| fn main() {} | |
| struct Machine<State> { | |
| data: Vec<u16>, | |
| state: State, | |
| } | |
| struct State1 {} | |
| struct State2 {} |
head: 0atman:branch-name-with-your-changes assignee: 0atman base: local-branch-name-on-this-repo draft: true issue: linked issue url? reviewers:
| use std::thread; | |
| struct User { | |
| age: u16, | |
| } | |
| fn simple_thread() { | |
| let user = User { age: 30 }; | |
| // thread::spawn(|| &user); // can't borrow `user` as thread may outlive current function | |
| thread::spawn(|| user); // can only move into thread, then it's gone. |
| use rand_derive2::RandGen; | |
| use rand::random; | |
| fn main() { | |
| println!("Hey, world! 👻 3spoopy5me"); | |
| let some_rooms: Vec<Room> = (1..=5) | |
| .map(|n| Room {name: "empty room".into(), next_room: vec![], item: random()}) | |
| .collect(); | |
| let room = Room { |
| use std::fs; | |
| use std::io::{self, BufRead, Write}; | |
| use std::{thread, time}; | |
| /// stdout readline implementation | |
| fn wait() { | |
| io::stdin().lock().lines().next(); | |
| } | |
| /// Type the script at 300wpm |
| default: lints run | |
| run: | |
| @poetry run python app.py | |
| watch: | |
| @poetry run watchmedo auto-restart --ignore-directories --patterns="*.py" --ignore-patterns="*#*" --recursive make | |
| lints: | |
| clear |
| html { | |
| head { | |
| title { "example.com" } | |
| style { | |
| "body { background: #fafbfc; }" | |
| "#main { padding: 2rem; }" | |
| } | |
| } | |
| body { | |
| @Header { "example.com" } |
| /******************************************************************* | |
| A telegram bot for your Adafruit Feather M0 with KeyboardFeatherWing | |
| Adapted from telegram code written by Brian Lough | |
| *******************************************************************/ | |
| #include <Adafruit_GFX.h> | |
| #include <SPI.h> | |
| #include <WiFi101.h> | |
| #include <Wire.h> | |
| #include <Adafruit_ILI9341.h> |
| #![feature(start, libc, lang_items)] | |
| #![no_std] | |
| #![no_main] | |
| #![feature(rustc_private)] | |
| extern crate libc; | |
| extern { // A list of imported C functions | |
| pub fn printf(format: *const u8, ...) -> i32; | |
| } |