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
#[derive(Debug)] | |
struct Foo(u32); | |
fn foo(val: u32) -> Foo { Foo(val) } | |
impl Foo { | |
fn new() -> Self { Foo(3) } | |
} | |
trait BoolExt { |
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::collections::HashSet; | |
use std::hash::Hash; | |
pub struct Dag<'a, L: 'a, N: 'a> { | |
leaves: HashSet<L>, | |
// Might be better as an arena but that isn't available the playpen | |
nodes: Vec<Node<'a, L, N>> | |
} | |
impl<'a, L: 'a + Eq + Hash, N: 'a> Dag<'a, L, N> { |
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
# change foo to your library name | |
# change Foo::Database to your Sequel database | |
namespace :bundler do | |
task :setup do | |
require 'rubygems' | |
require 'bundler/setup' | |
end | |
end |