From c4092032247ee98fb42f8036a000b70bef821a60 Mon Sep 17 00:00:00 2001 From: MarcoIeni Date: Mon, 17 Jan 2022 20:53:51 +0000 Subject: [PATCH] deploy: cb591acb56260a5bc8824c9a51d017673775dc64 --- .env | 2 +- 404.html | 54 +++------ additional_resources/design-principles.html | 72 +++++------- additional_resources/index.html | 60 ++++------ anti_patterns/borrow_clone.html | 60 ++++------ anti_patterns/deny-warnings.html | 60 ++++------ anti_patterns/deref.html | 60 ++++------ anti_patterns/index.html | 60 ++++------ book.js | 9 +- css/general.css | 1 + css/variables.css | 6 +- functional/generics-type-classes.html | 60 ++++------ functional/index.html | 60 ++++------ functional/paradigms.html | 104 +++++++----------- idioms/coercion-arguments.html | 60 ++++------ idioms/concat-format.html | 60 ++++------ idioms/ctor.html | 60 ++++------ idioms/default.html | 60 ++++------ idioms/deref.html | 60 ++++------ idioms/dtor-finally.html | 60 ++++------ idioms/ffi/accepting-strings.html | 60 ++++------ idioms/ffi/errors.html | 60 ++++------ idioms/ffi/intro.html | 60 ++++------ idioms/ffi/passing-strings.html | 60 ++++------ idioms/index.html | 60 ++++------ idioms/mem-replace.html | 60 ++++------ idioms/on-stack-dyn-dispatch.html | 60 ++++------ idioms/option-iter.html | 60 ++++------ idioms/pass-var-to-closure.html | 60 ++++------ idioms/priv-extend.html | 60 ++++------ idioms/rustdoc-init.html | 60 ++++------ idioms/temporary-mutability.html | 60 ++++------ index.html | 56 +++------- intro.html | 56 +++------- patterns/behavioural/RAII.html | 60 ++++------ patterns/behavioural/command.html | 60 ++++------ patterns/behavioural/interpreter.html | 60 ++++------ patterns/behavioural/intro.html | 60 ++++------ patterns/behavioural/newtype.html | 60 ++++------ patterns/behavioural/strategy.html | 60 ++++------ patterns/behavioural/visitor.html | 60 ++++------ patterns/creational/builder.html | 60 ++++------ patterns/creational/fold.html | 60 ++++------ patterns/creational/intro.html | 60 ++++------ patterns/ffi/export.html | 60 ++++------ patterns/ffi/intro.html | 60 ++++------ patterns/ffi/wrappers.html | 60 ++++------ patterns/index.html | 60 ++++------ patterns/structural/compose-structs.html | 60 ++++------ patterns/structural/intro.html | 60 ++++------ patterns/structural/small-crates.html | 60 ++++------ patterns/structural/unsafe-mods.html | 60 ++++------ print.html | 116 ++++++++------------ translations.html | 60 ++++------ 54 files changed, 1062 insertions(+), 2054 deletions(-) diff --git a/.env b/.env index 8ece816..6ce0034 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -MDBOOK_VERSION=0.4.12 +MDBOOK_VERSION=0.4.15 diff --git a/404.html b/404.html index 35f95f1..8b3304c 100644 --- a/404.html +++ b/404.html @@ -4,36 +4,29 @@ - - - + - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/additional_resources/design-principles.html b/additional_resources/design-principles.html index aecc425..12b3362 100644 --- a/additional_resources/design-principles.html +++ b/additional_resources/design-principles.html @@ -4,35 +4,28 @@ Design principles - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/additional_resources/index.html b/additional_resources/index.html index e70d526..4ce7bb2 100644 --- a/additional_resources/index.html +++ b/additional_resources/index.html @@ -4,35 +4,28 @@ Additional Resources - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/anti_patterns/borrow_clone.html b/anti_patterns/borrow_clone.html index 8525976..1b27482 100644 --- a/anti_patterns/borrow_clone.html +++ b/anti_patterns/borrow_clone.html @@ -4,35 +4,28 @@ Clone to satisfy the borrow checker - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/anti_patterns/deny-warnings.html b/anti_patterns/deny-warnings.html index d6eaefb..ed90eb5 100644 --- a/anti_patterns/deny-warnings.html +++ b/anti_patterns/deny-warnings.html @@ -4,35 +4,28 @@ #[deny(warnings)] - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/anti_patterns/deref.html b/anti_patterns/deref.html index 6c3bfbc..7a5cd33 100644 --- a/anti_patterns/deref.html +++ b/anti_patterns/deref.html @@ -4,35 +4,28 @@ Deref Polymorphism - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/anti_patterns/index.html b/anti_patterns/index.html index cf027b3..76ebe9d 100644 --- a/anti_patterns/index.html +++ b/anti_patterns/index.html @@ -4,35 +4,28 @@ Anti-patterns - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/book.js b/book.js index 79d4035..d40440c 100644 --- a/book.js +++ b/book.js @@ -371,7 +371,14 @@ function playground_text(playground) { }); themePopup.addEventListener('click', function (e) { - var theme = e.target.id || e.target.parentElement.id; + var theme; + if (e.target.className === "theme") { + theme = e.target.id; + } else if (e.target.parentElement.className === "theme") { + theme = e.target.parentElement.id; + } else { + return; + } set_theme(theme); }); diff --git a/css/general.css b/css/general.css index 63317b3..ef2ba50 100644 --- a/css/general.css +++ b/css/general.css @@ -12,6 +12,7 @@ html { color: var(--fg); background-color: var(--bg); text-size-adjust: none; + -webkit-text-size-adjust: none; } body { diff --git a/css/variables.css b/css/variables.css index 9ff64d6..56b634b 100644 --- a/css/variables.css +++ b/css/variables.css @@ -67,7 +67,7 @@ --links: #2b79a2; - --inline-code-color: #c5c8c6;; + --inline-code-color: #c5c8c6; --theme-popup-bg: #141617; --theme-popup-border: #43484d; @@ -147,7 +147,7 @@ --links: #2b79a2; - --inline-code-color: #c5c8c6;; + --inline-code-color: #c5c8c6; --theme-popup-bg: #161923; --theme-popup-border: #737480; @@ -228,7 +228,7 @@ --links: #2b79a2; - --inline-code-color: #c5c8c6;; + --inline-code-color: #c5c8c6; --theme-popup-bg: #141617; --theme-popup-border: #43484d; diff --git a/functional/generics-type-classes.html b/functional/generics-type-classes.html index e0f6bfe..2e1bb26 100644 --- a/functional/generics-type-classes.html +++ b/functional/generics-type-classes.html @@ -4,35 +4,28 @@ Generics as Type Classes - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/functional/index.html b/functional/index.html index dbf86ef..b679c8c 100644 --- a/functional/index.html +++ b/functional/index.html @@ -4,35 +4,28 @@ Functional Programming - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/functional/paradigms.html b/functional/paradigms.html index 5765668..fa7a74a 100644 --- a/functional/paradigms.html +++ b/functional/paradigms.html @@ -4,35 +4,28 @@ Programming paradigms - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/coercion-arguments.html b/idioms/coercion-arguments.html index ac10eab..016f950 100644 --- a/idioms/coercion-arguments.html +++ b/idioms/coercion-arguments.html @@ -4,35 +4,28 @@ Use borrowed types for arguments - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/concat-format.html b/idioms/concat-format.html index e08d8fa..bfdcdc0 100644 --- a/idioms/concat-format.html +++ b/idioms/concat-format.html @@ -4,35 +4,28 @@ Concatenating Strings with format! - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/ctor.html b/idioms/ctor.html index a00bc9f..da09dbc 100644 --- a/idioms/ctor.html +++ b/idioms/ctor.html @@ -4,35 +4,28 @@ Constructor - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/default.html b/idioms/default.html index 8e1c7c5..8ab57ba 100644 --- a/idioms/default.html +++ b/idioms/default.html @@ -4,35 +4,28 @@ The Default Trait - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/deref.html b/idioms/deref.html index 0a6bde1..06fa623 100644 --- a/idioms/deref.html +++ b/idioms/deref.html @@ -4,35 +4,28 @@ Collections Are Smart Pointers - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/dtor-finally.html b/idioms/dtor-finally.html index 72abe21..11c1039 100644 --- a/idioms/dtor-finally.html +++ b/idioms/dtor-finally.html @@ -4,35 +4,28 @@ Finalisation in Destructors - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/ffi/accepting-strings.html b/idioms/ffi/accepting-strings.html index c27ad97..4b5650d 100644 --- a/idioms/ffi/accepting-strings.html +++ b/idioms/ffi/accepting-strings.html @@ -4,35 +4,28 @@ Accepting Strings - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/ffi/errors.html b/idioms/ffi/errors.html index d28382e..915f0e0 100644 --- a/idioms/ffi/errors.html +++ b/idioms/ffi/errors.html @@ -4,35 +4,28 @@ Idiomatic Errors - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/ffi/intro.html b/idioms/ffi/intro.html index 40158b1..d044bf0 100644 --- a/idioms/ffi/intro.html +++ b/idioms/ffi/intro.html @@ -4,35 +4,28 @@ Foreign function interface (FFI) - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/ffi/passing-strings.html b/idioms/ffi/passing-strings.html index 8ae2580..1d77a84 100644 --- a/idioms/ffi/passing-strings.html +++ b/idioms/ffi/passing-strings.html @@ -4,35 +4,28 @@ Passing Strings - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/index.html b/idioms/index.html index 3bd5714..e5c1dd0 100644 --- a/idioms/index.html +++ b/idioms/index.html @@ -4,35 +4,28 @@ Idioms - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/mem-replace.html b/idioms/mem-replace.html index 70880f3..36cf1d1 100644 --- a/idioms/mem-replace.html +++ b/idioms/mem-replace.html @@ -4,35 +4,28 @@ mem::{take(_), replace(_)} - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/on-stack-dyn-dispatch.html b/idioms/on-stack-dyn-dispatch.html index eb1aa51..d9b9be6 100644 --- a/idioms/on-stack-dyn-dispatch.html +++ b/idioms/on-stack-dyn-dispatch.html @@ -4,35 +4,28 @@ On-Stack Dynamic Dispatch - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/option-iter.html b/idioms/option-iter.html index 3fb19b4..8716469 100644 --- a/idioms/option-iter.html +++ b/idioms/option-iter.html @@ -4,35 +4,28 @@ Iterating over an Option - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/pass-var-to-closure.html b/idioms/pass-var-to-closure.html index 58f8866..6c8b0cd 100644 --- a/idioms/pass-var-to-closure.html +++ b/idioms/pass-var-to-closure.html @@ -4,35 +4,28 @@ Pass Variables to Closure - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/priv-extend.html b/idioms/priv-extend.html index d584bab..bdc2796 100644 --- a/idioms/priv-extend.html +++ b/idioms/priv-extend.html @@ -4,35 +4,28 @@ Privacy For Extensibility - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/rustdoc-init.html b/idioms/rustdoc-init.html index 8ff6e37..88da972 100644 --- a/idioms/rustdoc-init.html +++ b/idioms/rustdoc-init.html @@ -4,35 +4,28 @@ Easy doc initialization - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/idioms/temporary-mutability.html b/idioms/temporary-mutability.html index efc8db3..bef16d7 100644 --- a/idioms/temporary-mutability.html +++ b/idioms/temporary-mutability.html @@ -4,35 +4,28 @@ Temporary mutability - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/index.html b/index.html index dcbaf06..703c013 100644 --- a/index.html +++ b/index.html @@ -4,35 +4,28 @@ Introduction - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/intro.html b/intro.html index 49a80e9..4270b69 100644 --- a/intro.html +++ b/intro.html @@ -4,35 +4,28 @@ Introduction - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/behavioural/RAII.html b/patterns/behavioural/RAII.html index d295378..7c06492 100644 --- a/patterns/behavioural/RAII.html +++ b/patterns/behavioural/RAII.html @@ -4,35 +4,28 @@ RAII Guards - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/behavioural/command.html b/patterns/behavioural/command.html index 94f5d76..6f4d438 100644 --- a/patterns/behavioural/command.html +++ b/patterns/behavioural/command.html @@ -4,35 +4,28 @@ Command - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/behavioural/interpreter.html b/patterns/behavioural/interpreter.html index 7149475..85d6833 100644 --- a/patterns/behavioural/interpreter.html +++ b/patterns/behavioural/interpreter.html @@ -4,35 +4,28 @@ Interpreter - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/behavioural/intro.html b/patterns/behavioural/intro.html index 1fec81f..12cfcb8 100644 --- a/patterns/behavioural/intro.html +++ b/patterns/behavioural/intro.html @@ -4,35 +4,28 @@ Behavioural - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/behavioural/newtype.html b/patterns/behavioural/newtype.html index 90ebb8a..2c77f44 100644 --- a/patterns/behavioural/newtype.html +++ b/patterns/behavioural/newtype.html @@ -4,35 +4,28 @@ Newtype - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/behavioural/strategy.html b/patterns/behavioural/strategy.html index 5fb53f6..a0d2184 100644 --- a/patterns/behavioural/strategy.html +++ b/patterns/behavioural/strategy.html @@ -4,35 +4,28 @@ Strategy - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/behavioural/visitor.html b/patterns/behavioural/visitor.html index 7efbc23..f1a658a 100644 --- a/patterns/behavioural/visitor.html +++ b/patterns/behavioural/visitor.html @@ -4,35 +4,28 @@ Visitor - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/creational/builder.html b/patterns/creational/builder.html index 7df0e44..315e1ff 100644 --- a/patterns/creational/builder.html +++ b/patterns/creational/builder.html @@ -4,35 +4,28 @@ Builder - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/creational/fold.html b/patterns/creational/fold.html index 398130e..e9df6a3 100644 --- a/patterns/creational/fold.html +++ b/patterns/creational/fold.html @@ -4,35 +4,28 @@ Fold - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/creational/intro.html b/patterns/creational/intro.html index 0246267..4b0f035 100644 --- a/patterns/creational/intro.html +++ b/patterns/creational/intro.html @@ -4,35 +4,28 @@ Creational - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/ffi/export.html b/patterns/ffi/export.html index 8852ade..0f07e38 100644 --- a/patterns/ffi/export.html +++ b/patterns/ffi/export.html @@ -4,35 +4,28 @@ Object-Based APIs - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/ffi/intro.html b/patterns/ffi/intro.html index f43b415..c4592d5 100644 --- a/patterns/ffi/intro.html +++ b/patterns/ffi/intro.html @@ -4,35 +4,28 @@ Foreign function interface (FFI) - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/ffi/wrappers.html b/patterns/ffi/wrappers.html index 71cec17..a0e0ac5 100644 --- a/patterns/ffi/wrappers.html +++ b/patterns/ffi/wrappers.html @@ -4,35 +4,28 @@ Type Consolidation into Wrappers - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/index.html b/patterns/index.html index 8ecd7e7..63cd49e 100644 --- a/patterns/index.html +++ b/patterns/index.html @@ -4,35 +4,28 @@ Design Patterns - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/structural/compose-structs.html b/patterns/structural/compose-structs.html index c2e8ce3..4dac8b3 100644 --- a/patterns/structural/compose-structs.html +++ b/patterns/structural/compose-structs.html @@ -4,35 +4,28 @@ Compose Structs - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/structural/intro.html b/patterns/structural/intro.html index ad86e0b..3f893db 100644 --- a/patterns/structural/intro.html +++ b/patterns/structural/intro.html @@ -4,35 +4,28 @@ Structural - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/structural/small-crates.html b/patterns/structural/small-crates.html index 1cbba09..49b230d 100644 --- a/patterns/structural/small-crates.html +++ b/patterns/structural/small-crates.html @@ -4,35 +4,28 @@ Prefer Small Crates - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/patterns/structural/unsafe-mods.html b/patterns/structural/unsafe-mods.html index 7c62575..31a8260 100644 --- a/patterns/structural/unsafe-mods.html +++ b/patterns/structural/unsafe-mods.html @@ -4,35 +4,28 @@ Contain unsafety in small modules - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - - diff --git a/print.html b/print.html index 2e8c55a..ce510b3 100644 --- a/print.html +++ b/print.html @@ -4,36 +4,29 @@ Rust Design Patterns - - - + - - - - - + + + - - + - - + - - + - - - + - - - - diff --git a/translations.html b/translations.html index 73ef831..eabe485 100644 --- a/translations.html +++ b/translations.html @@ -4,35 +4,28 @@ Translations - Rust Design Patterns - - - - - - - + + + - - + - - + - - + - - - + - - -