quine

Crates.ioquine
lib.rsquine
version0.1.0
sourcesrc
created_at2022-10-06 18:34:20.981507
updated_at2022-10-06 18:34:20.981507
descriptionquine
homepage
repository
max_upload_size
id681534
size2,829
(btwiuse)

documentation

README

quine

The output of running the program:

$ cargo run
fn main() {
    let x = "fn main() {\n    let x = ";
    let y = "print!(\"{}{:?};\n    let y = {:?};\n    {}\", x, x, y, y)\n}\n";
    print!("{}{:?};
    let y = {:?};
    {}", x, x, y, y)
}

is the same as the source of the program itself:

$ cat quine.rs
fn main() {
    let x = "fn main() {\n    let x = ";
    let y = "print!(\"{}{:?};\n    let y = {:?};\n    {}\", x, x, y, y)\n}\n";
    print!("{}{:?};
    let y = {:?};
    {}", x, x, y, y)
}
Commit count: 0

cargo fmt