Skip to content

Instantly share code, notes, and snippets.

@Steelbirdy
Steelbirdy / audit-on-push.yml
Created May 13, 2021 22:02 — forked from LukeMathWalker/audit.yml
GitHub Actions - Rust setup
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
@Steelbirdy
Steelbirdy / euclid.rs
Last active September 4, 2022 16:05
The Euclidean Algorithm implemented entirely in the Rust type system.
#![feature(generic_associated_types)]
use std::marker::PhantomData;
macro_rules! num {
() => { Z };
(* $($rest:tt)*) => { S<num!($($rest)*)> };
}
macro_rules! print_gcd {