This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use glium::glutin::{ | |
| dpi::LogicalSize, Api, ContextBuilder, Event, EventsLoop, GlRequest, WindowBuilder, WindowEvent, | |
| }; | |
| use glium::index::{NoIndices, PrimitiveType}; | |
| use glium::texture::RawImage2d; | |
| use glium::{implement_vertex, uniform, Display, DrawParameters, Program, Surface, VertexBuffer}; | |
| use image::GenericImageView; | |
| use std::io::Cursor; | |
| use glium::uniforms::{Sampler, MagnifySamplerFilter}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use serenity::model::prelude::{Channel, UserId}; | |
| use serenity::utils::Colour; | |
| use serenity::{ | |
| framework::{ | |
| standard::macros::{check, command, group, help}, | |
| standard::{ | |
| help_commands, Args, CheckResult, CommandGroup, CommandOptions, CommandResult, | |
| HelpOptions, | |
| }, | |
| StandardFramework, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @[Link(ldflags: "-L#{__DIR__} -lraylib -lglfw3 -lX11 -lm")] | |
| lib LibRaylib | |
| struct Color | |
| r : UInt8 | |
| g : UInt8 | |
| b : UInt8 | |
| a : UInt8 | |
| end | |
| fun InitWindow(width : Int32, height : Int32, title : LibC::Char*) : Void |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::fmt::{Display, Formatter, Result}; | |
| use std::sync::{Arc, Mutex}; | |
| enum Killer { | |
| AnakinSkywalker, | |
| Clones, | |
| } | |
| impl Display for Killer { | |
| fn fmt(&self, f: &mut Formatter) -> Result { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun main(args: Array<String>) { | |
| val str = "I am a string" | |
| str.run { | |
| // no lambda params, receiver is value type (String), returns R, the result of the lambda. | |
| } | |
| str.let { | |
| // lambda params are value type (String), no receiver, returns R, the result of the lambda. | |
| } |
NewerOlder