aboutsummaryrefslogtreecommitdiff
path: root/examples/text-adventure/main.rs
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2023-04-02 21:38:17 +0200
committerAndreas Grois <andi@grois.info>2023-04-02 21:53:09 +0200
commit418f514fc46f45ae2901753e3398adb33664bed9 (patch)
treef8edc0df880a00d4964877d4b835c0eb9e481210 /examples/text-adventure/main.rs
parent02d01dd1b544a576caeb8da42912c5db904b94bd (diff)
I, for one, welcome our new clippy overlords
Diffstat (limited to 'examples/text-adventure/main.rs')
-rw-r--r--examples/text-adventure/main.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/examples/text-adventure/main.rs b/examples/text-adventure/main.rs
index c98441b..1d538cc 100644
--- a/examples/text-adventure/main.rs
+++ b/examples/text-adventure/main.rs
@@ -1,3 +1,5 @@
+#![deny(clippy::pedantic)]
+#![deny(clippy::all)]
//! A small example text adventure, the logic of which is implemented as a Free Monad based eDSL.
//!
//! The goal of this game is to buy a sausage roll. With pickle.
@@ -11,17 +13,17 @@
//!
//! In a real project, I'd just make all game state (here: inventory) `Copy`, and use owned values wherever possible to make the code
//! more concise. If `Copy` is not an option, I'd probably make a custom version of `run!{}` that allows to clone the
-//! game state in a convenient way (see https://github.com/bodil/higher/issues/6).
+//! game state in a convenient way (see [higher issue 6](https://github.com/bodil/higher/issues/6)).
//!
//! But on to the explanation what is going on:
//! This project has 4 modules:
-//! - "data" contains the data. Stuff like item types, item descriptions, rooms, etc.
-//! - "dsl" contains the embedded domain specific language. In other words, a Functor and the corresponding Free Monad type (and some helpers)
-//! - "logic" describes the game's main logic using the language defined in "dsl"
-//! - "side_effects" actually runs the logic.
+//! - `data` contains the data. Stuff like item types, item descriptions, rooms, etc.
+//! - `dsl` contains the embedded domain specific language. In other words, a Functor and the corresponding Free Monad type (and some helpers)
+//! - `logic` describes the game's main logic using the language defined in "dsl"
+//! - `side_effects` actually runs the logic.
//!
-//! The important part here is that all the stuff that isn't in "side_effects" is independent of the concrete implementation of "side_effects".
-//! The current "side_effects" runs a text-adventure, but it could just as well render as a visual-novel, without the need to touch any of the other modules.
+//! The important part here is that all the stuff that isn't in `side_effects` is independent of the concrete implementation of `side_effects`.
+//! The current `side_effects` runs a text-adventure, but it could just as well render as a visual-novel, without the need to touch any of the other modules.
mod data;
mod dsl;