Skip to content

Instantly share code, notes, and snippets.

View changed.rs
//! This crate provides types for UCD’s `Blocks.txt`.
pub struct Blocks {
ranges: Vec<(RangeInclusive<u32>, String)>,
}
impl Blocks {
pub fn block_of(&self, c: char) -> &str {
self.ranges
.binary_search_by(|(range, _)| {
View q.md
#[derive(Debug, Snafu)]
#[snafu(module)]
enum Error { Alpha }

By default, should that generate

mod error {
@shepmaster
shepmaster / playground.rs
Created January 19, 2020 04:13
Code shared from the Rust Playground
View playground.rs
// This code was saved by an automated test for the Rust Playground
@shepmaster
shepmaster / playground.rs
Created January 19, 2020 02:49
Code shared from the Rust Playground
View playground.rs
// This code was saved by an automated test for the Rust Playground
@shepmaster
shepmaster / playground.rs
Created January 18, 2020 19:04
Code shared from the Rust Playground
View playground.rs
// This code was saved by an automated test for the Rust Playground
@shepmaster
shepmaster / playground.rs
Created January 18, 2020 18:44
Code shared from the Rust Playground
View playground.rs
// This code was saved by an automated test for the Rust Playground
@shepmaster
shepmaster / playground.rs
Created December 19, 2019 04:21
Code shared from the Rust Playground
View playground.rs
// This code was saved by an automated test for the Rust Playground
@shepmaster
shepmaster / playground.rs
Created December 14, 2019 15:21
Code shared from the Rust Playground
View playground.rs
// This code was saved by an automated test for the Rust Playground
@shepmaster
shepmaster / playground.rs
Created December 13, 2019 19:08
Code shared from the Rust Playground
View playground.rs
// This code was saved by an automated test for the Rust Playground
View gist:7c0ed0a239ebc2969878df18fdea5539
{
"text": "`Twas brillig, and the slithy toves
Did gyre and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.
\"Beware the Jabberwock, my son!
The jaws that bite, the claws that catch!
Beware the Jubjub bird, and shun
The frumious Bandersnatch!\"