aboutsummaryrefslogtreecommitdiff
path: root/main.rs
diff options
context:
space:
mode:
authorMartin Ashby <martin@ashbysoft.com>2022-10-09 13:06:52 +0100
committerMartin Ashby <martin@ashbysoft.com>2022-10-09 13:06:52 +0100
commit4374e88f587d6e7a0135011a8d7e2d904e9369df (patch)
treecf3633d5fcb35f39a481570ced4da95d771b6e6d /main.rs
downloadrust-quine-main.tar.gz
rust-quine-main.tar.bz2
rust-quine-main.tar.xz
rust-quine-main.zip
Simple quine in rust, just because.HEADmain
Diffstat (limited to 'main.rs')
-rw-r--r--main.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.rs b/main.rs
new file mode 100644
index 0000000..29fb17b
--- /dev/null
+++ b/main.rs
@@ -0,0 +1 @@
+fn main() { const PGRM : &str = "fn main() { const PGRM : &str = \"%s\"; println!(\"{}\", PGRM.replacen(\"%s\", &PGRM.escape_default().to_string(), 1)); }"; println!("{}", PGRM.replacen("%s", &PGRM.escape_default().to_string(), 1)); }