mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-20 15:41:38 +01:00
style: format the files the path edits touched with rustfmt and nixfmt
This commit is contained in:
1 parent
259575a1b3
commit
279ac0f759
7 files changed
+39
-15
No files matched your search
@@ -354,8 +354,7 @@ pub fn run(
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
const TRANSCRIPT: &str =
|
||||
include_str!("../fixtures/gesture-stream.transcript.txt");
|
||||
const TRANSCRIPT: &str = include_str!("../fixtures/gesture-stream.transcript.txt");
|
||||
|
||||
fn gestures(told: &[SocketMessage]) -> Vec<PanGesture> {
|
||||
told.iter()
|
||||
|
||||
@@ -850,7 +850,10 @@ mod tests {
|
||||
)
|
||||
.expect("the header statement");
|
||||
|
||||
assert_eq!(found.statement.file, "crates/komorebi-macos/src/process_event.rs");
|
||||
assert_eq!(
|
||||
found.statement.file,
|
||||
"crates/komorebi-macos/src/process_event.rs"
|
||||
);
|
||||
assert_eq!(found.statement.function, "process_event");
|
||||
assert_eq!(found.statement.owner, "WindowManager");
|
||||
assert_eq!(found.confidence, Confidence::Likely);
|
||||
@@ -1035,7 +1038,13 @@ mod tests {
|
||||
// the commit before the latest change to komorebi's source
|
||||
let Some(history) = git(
|
||||
&repo(),
|
||||
&["log", "-2", "--format=%H", "--", "crates/komorebi-macos/src"],
|
||||
&[
|
||||
"log",
|
||||
"-2",
|
||||
"--format=%H",
|
||||
"--",
|
||||
"crates/komorebi-macos/src",
|
||||
],
|
||||
) else {
|
||||
return;
|
||||
};
|
||||
|
||||
@@ -149,7 +149,13 @@ fn git(args: &[&str]) -> Option<String> {
|
||||
#[test]
|
||||
fn only_the_files_that_changed_since_the_recorded_commit_are_doubted() {
|
||||
komorebi_recorder::skip_without_komorebi_mac_source!();
|
||||
let Some(history) = git(&["log", "-2", "--format=%H", "--", "crates/komorebi-macos/src"]) else {
|
||||
let Some(history) = git(&[
|
||||
"log",
|
||||
"-2",
|
||||
"--format=%H",
|
||||
"--",
|
||||
"crates/komorebi-macos/src",
|
||||
]) else {
|
||||
return;
|
||||
};
|
||||
let Some(older) = history.lines().nth(1) else {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# The crane derivations of schemars-nixgen, the tool that writes the Nix options of the modules from the JSON
|
||||
# Schemas, from the one Cargo workspace (nix/workspace-src.nix, platform "nixgen": the tool and nothing
|
||||
# else). It is pure Rust, so one build serves every system.
|
||||
{ inputs, self }:
|
||||
{ inputs }:
|
||||
let
|
||||
lib' = import ../lib.nix { inherit inputs; };
|
||||
inherit (inputs) crane;
|
||||
@@ -61,6 +61,11 @@ in
|
||||
schemars-nixgen = craneLib.buildPackage individualCrateArgs;
|
||||
in
|
||||
{
|
||||
inherit craneLib src individualCrateArgs schemars-nixgen;
|
||||
inherit
|
||||
craneLib
|
||||
src
|
||||
individualCrateArgs
|
||||
schemars-nixgen
|
||||
;
|
||||
};
|
||||
}
|
||||
@@ -2,13 +2,12 @@
|
||||
# `just nixgen-macos`), and its checks. It is a development tool: nothing of a release has it.
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
lib' = import ../lib.nix { inherit inputs; };
|
||||
nixgen = import ./build.nix { inherit inputs self; };
|
||||
nixgen = import ./build.nix { inherit inputs; };
|
||||
in
|
||||
{
|
||||
perSystem =
|
||||
|
||||
@@ -44,9 +44,11 @@ in
|
||||
|
||||
flake.overlays.recorder =
|
||||
final: _:
|
||||
lib.optionalAttrs (builtins.elem final.stdenv.hostPlatform.system (lib'.macosSystems ++ lib'.linuxSystems)) {
|
||||
inherit (recorder.mkRecorderPackages { pkgs = mkPkgs final.stdenv.hostPlatform.system; })
|
||||
komorebi-recorder
|
||||
;
|
||||
};
|
||||
lib.optionalAttrs
|
||||
(builtins.elem final.stdenv.hostPlatform.system (lib'.macosSystems ++ lib'.linuxSystems))
|
||||
{
|
||||
inherit (recorder.mkRecorderPackages { pkgs = mkPkgs final.stdenv.hostPlatform.system; })
|
||||
komorebi-recorder
|
||||
;
|
||||
};
|
||||
}
|
||||
@@ -104,7 +104,11 @@ let
|
||||
macos = "(src/macos(\\.rs|/.*)|tests/macos_.*)";
|
||||
};
|
||||
# the recorder indexes every platform's files
|
||||
otherMarkers = if platform == "recorder" || platform == "nixgen" then [ ] else builtins.attrValues (removeAttrs markers [ platform ]);
|
||||
otherMarkers =
|
||||
if platform == "recorder" || platform == "nixgen" then
|
||||
[ ]
|
||||
else
|
||||
builtins.attrValues (removeAttrs markers [ platform ]);
|
||||
ofOtherPlatform =
|
||||
rel:
|
||||
builtins.any (
|
||||
|
||||
Reference in new issue
Block a user