1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-27 01:27:37 +02:00

Bump dprint plugins to their latest versions (#2402)

This commit is contained in:
Martin Geisler 2025-02-28 15:27:17 +01:00 committed by GitHub
parent f94a0398f0
commit 0134568034
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 34 additions and 34 deletions

View File

@ -8,10 +8,10 @@ members = [
"src/bare-metal/useful-crates/allocator-example", "src/bare-metal/useful-crates/allocator-example",
"src/bare-metal/useful-crates/zerocopy-example", "src/bare-metal/useful-crates/zerocopy-example",
"src/borrowing", "src/borrowing",
"src/concurrency/async-exercises/chat-async",
"src/concurrency/sync-exercises",
"src/control-flow-basics", "src/control-flow-basics",
"src/error-handling", "src/error-handling",
"src/concurrency/sync-exercises",
"src/concurrency/async-exercises/chat-async",
"src/generics", "src/generics",
"src/iterators", "src/iterators",
"src/lifetimes", "src/lifetimes",

View File

@ -21,10 +21,10 @@
"target/" "target/"
], ],
"plugins": [ "plugins": [
"https://plugins.dprint.dev/exec-0.4.3.json@42343548b8022c99b1d750be6b894fe6b6c7ee25f72ae9f9082226dd2e515072", "https://plugins.dprint.dev/exec-0.5.1.json@492414e39dea4dccc07b4af796d2f4efdb89e84bae2bd4e1e924c0cc050855bf",
"https://plugins.dprint.dev/json-0.17.4.wasm", "https://plugins.dprint.dev/json-0.20.0.wasm",
"https://plugins.dprint.dev/markdown-0.16.2.wasm", "https://plugins.dprint.dev/markdown-0.18.0.wasm",
"https://plugins.dprint.dev/toml-0.5.4.wasm", "https://plugins.dprint.dev/toml-0.7.0.wasm",
"https://plugins.dprint.dev/prettier-0.27.0.json@3557a62b4507c55a47d8cde0683195b14d13c41dda66d0f0b0e111aed107e2fe" "https://plugins.dprint.dev/prettier-0.56.0.json@0b67676535141b03f0eb0648172d3a20f13044b3d8df677d645bd79e3ee5147f"
] ]
} }

View File

@ -75,7 +75,7 @@ export default class Playground {
"Access-Control-Allow-Origin": "*", "Access-Control-Allow-Origin": "*",
}, },
fetchResponse: false, fetchResponse: false,
} },
); );
} }
@ -100,7 +100,7 @@ export default class Playground {
"Access-Control-Allow-Origin": "*", "Access-Control-Allow-Origin": "*",
}, },
fetchResponse: false, fetchResponse: false,
} },
); );
} }
} }

View File

@ -42,7 +42,7 @@ describe("Playground", () => {
await expect(playground.stderr).toBeDisplayed(); await expect(playground.stderr).toBeDisplayed();
// check for error message in stderr // check for error message in stderr
await expect(playground.stderr).toHaveText( await expect(playground.stderr).toHaveText(
expect.stringContaining("error: could not compile") expect.stringContaining("error: could not compile"),
); );
await expect(playground.stdout).toHaveText("No output"); await expect(playground.stdout).toHaveText("No output");
}); });

View File

@ -25,7 +25,7 @@ describe("speaker-notes", () => {
const handles = await browser.getWindowHandles(); const handles = await browser.getWindowHandles();
await browser.switchToWindow(handles[1]); await browser.switchToWindow(handles[1]);
await expect(browser).toHaveUrl( await expect(browser).toHaveUrl(
expect.stringContaining("#speaker-notes-open") expect.stringContaining("#speaker-notes-open"),
); );
}); });
}); });

View File

@ -10,5 +10,5 @@ export const config = deepmerge(
// clean services // clean services
services: [], services: [],
}, },
{ clone: false } { clone: false },
); );

View File

@ -13,12 +13,12 @@
instructorMenuList.insertBefore(redBoxItem, instructorMenuList.lastChild); instructorMenuList.insertBefore(redBoxItem, instructorMenuList.lastChild);
instructorMenuList.insertBefore( instructorMenuList.insertBefore(
playgroundStateItem, playgroundStateItem,
instructorMenuList.lastChild instructorMenuList.lastChild,
); );
redBoxItem.insertBefore(redBoxButton, redBoxItem.lastChild); redBoxItem.insertBefore(redBoxButton, redBoxItem.lastChild);
playgroundStateItem.insertBefore( playgroundStateItem.insertBefore(
playgroundStateButton, playgroundStateButton,
playgroundStateItem.lastChild playgroundStateItem.lastChild,
); );
instructorMenu.title = "Utilities for course instructors"; instructorMenu.title = "Utilities for course instructors";
@ -66,6 +66,6 @@
var playgroundStateButton = document.getElementById("playground-state"); var playgroundStateButton = document.getElementById("playground-state");
redBoxButton.addEventListener("click", () => window.redboxButtonClicked()); redBoxButton.addEventListener("click", () => window.redboxButtonClicked());
playgroundStateButton.addEventListener("click", () => playgroundStateButton.addEventListener("click", () =>
window.resetPlaygroundsClicked() window.resetPlaygroundsClicked(),
); );
})(); })();

View File

@ -1,31 +1,31 @@
(function savePlaygrounds() { (function savePlaygrounds() {
function setCodeToPlayground() { function setCodeToPlayground() {
var codes = JSON.parse( var codes = JSON.parse(
localStorage.getItem(`${window.location.href}₹code`) localStorage.getItem(`${window.location.href}₹code`),
); );
if (codes) { if (codes) {
var i = 0; var i = 0;
Array.from(document.querySelectorAll(".playground")).forEach(function ( Array.from(document.querySelectorAll(".playground")).forEach(
pre_block function (pre_block) {
) { let code_block = pre_block.querySelector("code");
let code_block = pre_block.querySelector("code"); let editor = window.ace.edit(code_block);
let editor = window.ace.edit(code_block); editor.setValue(codes[i]);
editor.setValue(codes[i]); editor.clearSelection();
editor.clearSelection(); i += 1;
i += 1; },
}); );
} }
} }
function getCodeFromPlayground() { function getCodeFromPlayground() {
var codes = []; var codes = [];
Array.from(document.querySelectorAll(".playground")).forEach(function ( Array.from(document.querySelectorAll(".playground")).forEach(
pre_block function (pre_block) {
) { let code_block = pre_block.querySelector("code");
let code_block = pre_block.querySelector("code"); let editor = window.ace.edit(code_block);
let editor = window.ace.edit(code_block); let code = editor.getValue();
let code = editor.getValue(); codes.push(code);
codes.push(code); },
}); );
localStorage.setItem(`${window.location.href}₹code`, JSON.stringify(codes)); localStorage.setItem(`${window.location.href}₹code`, JSON.stringify(codes));
} }
setCodeToPlayground(); setCodeToPlayground();

View File

@ -124,7 +124,7 @@
}; };
} else { } else {
window.alert( window.alert(
"Could not open popup, please check your popup blocker settings." "Could not open popup, please check your popup blocker settings.",
); );
} }
}); });