Skip to content

Commit

Permalink
Deploying to gh-pages from @ 0bfcba8 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
damoasda committed Dec 8, 2024
1 parent 0d489d4 commit 6b9a150
Show file tree
Hide file tree
Showing 115 changed files with 2,154 additions and 4,215 deletions.
57 changes: 18 additions & 39 deletions 404.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions appendix-00.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions appendix-01-keywords.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions appendix-02-operators.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions appendix-03-derivable-traits.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions appendix-04-useful-development-tools.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions appendix-05-editions.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions appendix-06-translation.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions appendix-07-nightly-rust.html

Large diffs are not rendered by default.

25 changes: 9 additions & 16 deletions book.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function playground_text(playground, hidden = true) {
}

var clipButton = document.createElement('button');
clipButton.className = 'fa fa-copy clip-button';
clipButton.className = 'clip-button';
clipButton.title = 'Copy to clipboard';
clipButton.setAttribute('aria-label', clipButton.title);
clipButton.innerHTML = '<i class=\"tooltiptext\"></i>';
Expand Down Expand Up @@ -258,7 +258,7 @@ function playground_text(playground, hidden = true) {

if (window.playground_copyable) {
var copyCodeClipboardButton = document.createElement('button');
copyCodeClipboardButton.className = 'fa fa-copy clip-button';
copyCodeClipboardButton.className = 'clip-button';
copyCodeClipboardButton.innerHTML = '<i class="tooltiptext"></i>';
copyCodeClipboardButton.title = 'Copy to clipboard';
copyCodeClipboardButton.setAttribute('aria-label', copyCodeClipboardButton.title);
Expand Down Expand Up @@ -289,6 +289,10 @@ function playground_text(playground, hidden = true) {
var themeToggleButton = document.getElementById('theme-toggle');
var themePopup = document.getElementById('theme-list');
var themeColorMetaTag = document.querySelector('meta[name="theme-color"]');
var themeIds = [];
themePopup.querySelectorAll('button.theme').forEach(function (el) {
themeIds.push(el.id);
});
var stylesheets = {
ayuHighlight: document.querySelector("[href$='ayu-highlight.css']"),
tomorrowNight: document.querySelector("[href$='tomorrow-night.css']"),
Expand Down Expand Up @@ -317,7 +321,7 @@ function playground_text(playground, hidden = true) {
function get_theme() {
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch (e) { }
if (theme === null || theme === undefined) {
if (theme === null || theme === undefined || !themeIds.includes(theme)) {
return default_theme;
} else {
return theme;
Expand Down Expand Up @@ -459,17 +463,6 @@ function playground_text(playground, hidden = true) {
try { localStorage.setItem('mdbook-sidebar', 'visible'); } catch (e) { }
}


var sidebarAnchorToggles = document.querySelectorAll('#sidebar a.toggle');

function toggleSection(ev) {
ev.currentTarget.parentElement.classList.toggle('expanded');
}

Array.from(sidebarAnchorToggles).forEach(function (el) {
el.addEventListener('click', toggleSection);
});

function hideSidebar() {
body.classList.remove('sidebar-visible')
body.classList.add('sidebar-hidden');
Expand Down Expand Up @@ -597,12 +590,12 @@ function playground_text(playground, hidden = true) {

function hideTooltip(elem) {
elem.firstChild.innerText = "";
elem.className = 'fa fa-copy clip-button';
elem.className = 'clip-button';
}

function showTooltip(elem, msg) {
elem.firstChild.innerText = msg;
elem.className = 'fa fa-copy tooltipped';
elem.className = 'clip-button tooltipped';
}

var clipboardSnippets = new ClipboardJS('.clip-button', {
Expand Down
57 changes: 18 additions & 39 deletions ch00-00-introduction.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch01-00-getting-started.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch01-01-installation.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch01-02-hello-world.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch01-03-hello-cargo.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch02-00-guessing-game-tutorial.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch03-00-common-programming-concepts.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch03-01-variables-and-mutability.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch03-02-data-types.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch03-03-how-functions-work.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch03-04-comments.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch03-05-control-flow.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch04-00-understanding-ownership.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch04-01-what-is-ownership.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch04-02-references-and-borrowing.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch04-03-slices.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch05-00-structs.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch05-01-defining-structs.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch05-02-example-structs.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch05-03-method-syntax.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch06-00-enums.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch06-01-defining-an-enum.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch06-02-match.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch06-03-if-let.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch07-01-packages-and-crates.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch07-02-defining-modules-to-control-scope-and-privacy.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch07-04-bringing-paths-into-scope-with-the-use-keyword.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch07-05-separating-modules-into-different-files.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch08-00-common-collections.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch08-01-vectors.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch08-02-strings.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch08-03-hash-maps.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch09-00-error-handling.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch09-01-unrecoverable-errors-with-panic.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch09-02-recoverable-errors-with-result.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch09-03-to-panic-or-not-to-panic.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch10-00-generics.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch10-01-syntax.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch10-02-traits.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch10-03-lifetime-syntax.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch11-00-testing.html

Large diffs are not rendered by default.

76 changes: 30 additions & 46 deletions ch11-01-writing-tests.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch11-02-running-tests.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch11-03-test-organization.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch12-00-an-io-project.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch12-01-accepting-command-line-arguments.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch12-02-reading-a-file.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch12-03-improving-error-handling-and-modularity.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch12-04-testing-the-librarys-functionality.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch12-05-working-with-environment-variables.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch12-06-writing-to-stderr-instead-of-stdout.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch13-00-functional-features.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch13-01-closures.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch13-02-iterators.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch13-03-improving-our-io-project.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch13-04-performance.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch14-00-more-about-cargo.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch14-01-release-profiles.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch14-02-publishing-to-crates-io.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch14-03-cargo-workspaces.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch14-04-installing-binaries.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch14-05-extending-cargo.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch15-00-smart-pointers.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch15-01-box.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch15-02-deref.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch15-03-drop.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch15-04-rc.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch15-05-interior-mutability.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch15-06-reference-cycles.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch16-00-concurrency.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch16-01-threads.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch16-02-message-passing.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch16-03-shared-state.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch16-04-extensible-concurrency-sync-and-send.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch17-00-oop.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch17-01-what-is-oo.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch17-02-trait-objects.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch17-03-oo-design-patterns.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch18-00-patterns.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch18-01-all-the-places-for-patterns.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch18-02-refutability.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch18-03-pattern-syntax.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch19-00-advanced-features.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch19-01-unsafe-rust.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch19-03-advanced-traits.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch19-04-advanced-types.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch19-05-advanced-functions-and-closures.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch19-06-macros.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch20-00-final-project-a-web-server.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch20-01-single-threaded.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch20-02-multithreaded.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions ch20-03-graceful-shutdown-and-cleanup.html

Large diffs are not rendered by default.

54 changes: 45 additions & 9 deletions css/chrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ a > .hljs {
border-block-end-style: solid;
}
#menu-bar.sticky,
.js #menu-bar-hover-placeholder:hover + #menu-bar,
.js #menu-bar:hover,
.js.sidebar-visible #menu-bar {
#menu-bar-hover-placeholder:hover + #menu-bar,
#menu-bar:hover,
html.sidebar-visible #menu-bar {
position: -webkit-sticky;
position: sticky;
top: 0 !important;
Expand Down Expand Up @@ -91,7 +91,7 @@ a > .hljs {
display: flex;
margin: 0 5px;
}
.no-js .left-buttons button {
html:not(.js) .left-buttons button {
display: none;
}

Expand All @@ -107,7 +107,7 @@ a > .hljs {
overflow: hidden;
text-overflow: ellipsis;
}
.js .menu-title {
.menu-title {
cursor: pointer;
}

Expand Down Expand Up @@ -250,8 +250,8 @@ pre > .buttons i {
pre > .buttons button {
cursor: inherit;
margin: 0px 5px;
padding: 3px 5px;
font-size: 14px;
padding: 4px 4px 3px 5px;
font-size: 23px;

border-style: solid;
border-width: 1px;
Expand All @@ -262,6 +262,27 @@ pre > .buttons button {
transition-property: color,border-color,background-color;
color: var(--icons);
}

pre > .buttons button.clip-button {
padding: 2px 4px 0px 6px;
}
pre > .buttons button.clip-button::before {
/* clipboard image from octicons (https://github.com/primer/octicons/tree/v2.0.0) MIT license
*/
content: url('data:image/svg+xml,<svg width="21" height="20" viewBox="0 0 24 25" \
xmlns="http://www.w3.org/2000/svg" aria-label="Copy to clipboard">\
<path d="M18 20h2v3c0 1-1 2-2 2H2c-.998 0-2-1-2-2V5c0-.911.755-1.667 1.667-1.667h5A3.323 3.323 0 \
0110 0a3.323 3.323 0 013.333 3.333h5C19.245 3.333 20 4.09 20 5v8.333h-2V9H2v14h16v-3zM3 \
7h14c0-.911-.793-1.667-1.75-1.667H13.5c-.957 0-1.75-.755-1.75-1.666C11.75 2.755 10.957 2 10 \
2s-1.75.755-1.75 1.667c0 .911-.793 1.666-1.75 1.666H4.75C3.793 5.333 3 6.09 3 7z"/>\
<path d="M4 19h6v2H4zM12 11H4v2h8zM4 17h4v-2H4zM15 15v-3l-4.5 4.5L15 21v-3l8.027-.032L23 15z"/>\
</svg>');
filter: var(--copy-button-filter);
}
pre > .buttons button.clip-button:hover::before {
filter: var(--copy-button-filter-hover);
}

@media (pointer: coarse) {
pre > .buttons button {
/* On mobile, make it easier to tap buttons. */
Expand Down Expand Up @@ -399,15 +420,30 @@ ul#searchresults span.teaser em {
background-color: var(--sidebar-bg);
color: var(--sidebar-fg);
}
.sidebar-iframe-inner {
background-color: var(--sidebar-bg);
color: var(--sidebar-fg);
padding: 10px 10px;
margin: 0;
font-size: 1.4rem;
}
.sidebar-iframe-outer {
border: none;
height: 100%;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
[dir=rtl] .sidebar { left: unset; right: 0; }
.sidebar-resizing {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
.no-js .sidebar,
.js:not(.sidebar-resizing) .sidebar {
html:not(.sidebar-resizing) .sidebar {
transition: transform 0.3s; /* Animation: slide away */
}
.sidebar code {
Expand Down
10 changes: 10 additions & 0 deletions css/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,16 @@ kbd {
vertical-align: middle;
}

sup {
/* Set the line-height for superscript and footnote references so that there
isn't an awkward space appearing above lines that contain the footnote.
See https://github.com/rust-lang/mdBook/pull/2443#discussion_r1813773583
for an explanation.
*/
line-height: 0;
}

:not(.footnote-definition) + .footnote-definition,
.footnote-definition + :not(.footnote-definition) {
margin-block-start: 2em;
Expand Down
36 changes: 33 additions & 3 deletions css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
--search-mark-bg: #e3b171;

--color-scheme: dark;

/* Same as `--icons` */
--copy-button-filter: invert(45%) sepia(6%) saturate(621%) hue-rotate(198deg) brightness(99%) contrast(85%);
/* Same as `--sidebar-active` */
--copy-button-filter-hover: invert(68%) sepia(55%) saturate(531%) hue-rotate(341deg) brightness(104%) contrast(101%);
}

.coal {
Expand Down Expand Up @@ -100,9 +105,14 @@
--search-mark-bg: #355c7d;

--color-scheme: dark;

/* Same as `--icons` */
--copy-button-filter: invert(26%) sepia(8%) saturate(575%) hue-rotate(169deg) brightness(87%) contrast(82%);
/* Same as `--sidebar-active` */
--copy-button-filter-hover: invert(36%) sepia(70%) saturate(503%) hue-rotate(167deg) brightness(98%) contrast(89%);
}

.light {
.light, html:not(.js) {
--bg: hsl(0, 0%, 100%);
--fg: hsl(0, 0%, 0%);

Expand Down Expand Up @@ -144,6 +154,11 @@
--search-mark-bg: #a2cff5;

--color-scheme: light;

/* Same as `--icons` */
--copy-button-filter: invert(45.49%);
/* Same as `--sidebar-active` */
--copy-button-filter-hover: invert(14%) sepia(93%) saturate(4250%) hue-rotate(243deg) brightness(99%) contrast(130%);
}

.navy {
Expand Down Expand Up @@ -188,6 +203,11 @@
--search-mark-bg: #a2cff5;

--color-scheme: dark;

/* Same as `--icons` */
--copy-button-filter: invert(51%) sepia(10%) saturate(393%) hue-rotate(198deg) brightness(86%) contrast(87%);
/* Same as `--sidebar-active` */
--copy-button-filter-hover: invert(46%) sepia(20%) saturate(1537%) hue-rotate(156deg) brightness(85%) contrast(90%);
}

.rust {
Expand Down Expand Up @@ -231,11 +251,14 @@
--searchresults-li-bg: #dec2a2;
--search-mark-bg: #e69f67;

--color-scheme: light;
/* Same as `--icons` */
--copy-button-filter: invert(51%) sepia(10%) saturate(393%) hue-rotate(198deg) brightness(86%) contrast(87%);
/* Same as `--sidebar-active` */
--copy-button-filter-hover: invert(77%) sepia(16%) saturate(1798%) hue-rotate(328deg) brightness(98%) contrast(83%);
}

@media (prefers-color-scheme: dark) {
.light.no-js {
html:not(.js) {
--bg: hsl(200, 7%, 8%);
--fg: #98a3ad;

Expand Down Expand Up @@ -275,5 +298,12 @@
--searchresults-border-color: #98a3ad;
--searchresults-li-bg: #2b2b2f;
--search-mark-bg: #355c7d;

--color-scheme: dark;

/* Same as `--icons` */
--copy-button-filter: invert(26%) sepia(8%) saturate(575%) hue-rotate(169deg) brightness(87%) contrast(82%);
/* Same as `--sidebar-active` */
--copy-button-filter-hover: invert(36%) sepia(70%) saturate(503%) hue-rotate(167deg) brightness(98%) contrast(89%);
}
}
57 changes: 18 additions & 39 deletions foreword.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-attr,
.hljs-tag,
.hljs-name,
.hljs-regexp,
Expand Down
57 changes: 18 additions & 39 deletions index.html

Large diffs are not rendered by default.

76 changes: 30 additions & 46 deletions print.html

Large diffs are not rendered by default.

57 changes: 18 additions & 39 deletions title-page.html

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions toc.html

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions toc.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions tomorrow-night.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/* Tomorrow Red */
.hljs-variable,
.hljs-attribute,
.hljs-attr,
.hljs-tag,
.hljs-regexp,
.ruby .hljs-constant,
Expand Down Expand Up @@ -54,6 +55,7 @@

/* Tomorrow Aqua */
.hljs-title,
.hljs-section,
.css .hljs-hexcolor {
color: #8abeb7;
}
Expand Down

0 comments on commit 6b9a150

Please sign in to comment.