lovecraft

Crates.iolovecraft
lib.rslovecraft
version0.2.0
sourcesrc
created_at2019-04-12 13:20:10.618552
updated_at2019-04-12 13:36:59.25462
descriptionbrings back the Lovecraft quotes on panic
homepage
repositoryhttps://github.com/Geal/lovecraft
max_upload_size
id127456
size7,280
Geoffroy Couprie (Geal)

documentation

https://docs.rs/lovecraft

README

You've met with a terrible fate, haven't you?

Long ago, every Rust program came with a set of Lovecraft quotes that would be displayed on panic. Unfortunately, for a lot of important reasons like making "hello world" programs smaller, they were removed.

Thankfully, this crate brings disorder and dread back into your programs.

With the following code:

extern crate lovecraft;

fn main() {
    lovecraft::invoke();

    panic!("Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn");
}

This will print:

$ ./main
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn

It was from the artists and poets that the pertinent answers came, and I
know that panic would have broken loose had they been able to compare notes.
As it was, lacking their original letters, I half suspected the compiler of
having asked leading questions, or of having edited the correspondence in
corroboration of what he had latently resolved to see.

You can also choose your own quotes with the function: lovecraft::panic_quotes(quotes: &'static [&'static str], default: &'static str)

Commit count: 7

cargo fmt