From 23ffbe39dcbd137df5294faee785ecb5e9d7f58a Mon Sep 17 00:00:00 2001 From: MultisampledNight Date: Thu, 18 Jan 2024 20:29:41 +0100 Subject: [PATCH] chore: format a bit and add `just fmt` --- CONTRIBUTING.md | 2 +- Cargo.toml | 7 +++---- docs/design/type-notation.typ | 2 +- flake.nix | 3 ++- justfile | 10 ++++++++-- testfiles/bare.ron | 8 ++++---- testfiles/invert.ron | 2 +- 7 files changed, 20 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dd58b5e..748fd03 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,7 +67,7 @@ Otherwise, we suggest these: [The Rust Programming Language book]: https://doc.rust-lang.org/book/ [typst's excellent tutorial]: https://typst.app/docs/tutorial -[Inkscape]: https://inkscape.org/ +[Inkscape]: https://inkscape.org/ [GIMP]: https://www.gimp.org/ [Blender]: https://www.blender.org/ [Penpot]: https://penpot.app/ diff --git a/Cargo.toml b/Cargo.toml index 74dd3e7..f4aa395 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,8 @@ [workspace] -members = [ - "crates/app", - "crates/executor", +members = [ + "crates/executor", "crates/ir", - "crates/cli", + "crates/cli", ] resolver = "2" diff --git a/docs/design/type-notation.typ b/docs/design/type-notation.typ index 7858b50..ee33517 100644 --- a/docs/design/type-notation.typ +++ b/docs/design/type-notation.typ @@ -32,7 +32,7 @@ One dimensional list of 32 bit signed integers: [i32] ``` -Due to inference, you'll also be able to use that in some mathematical operations with integers: +Due to inference, you'll also be able to use that in some mathematical operations with integers: `[i32] + i32` is a valid operation, for example (of course, you can't add types.) But that wouldn't add the second one to the list, but rather add the single i32 to all values in the left hand side list). That would also work with more dimensional arrays and dynamic streams like videos. diff --git a/flake.nix b/flake.nix index b0d5bde..da80ec2 100644 --- a/flake.nix +++ b/flake.nix @@ -35,9 +35,10 @@ clippy.enable = true; rustfmt.enable = true; }; - + packages = with pkgs; [ just nushell + ripgrep typst typst-lsp mold cargo-nextest cargo-watch diff --git a/justfile b/justfile index 396f6eb..468c9fb 100644 --- a/justfile +++ b/justfile @@ -1,5 +1,9 @@ all: test docs +test: + #!/usr/bin/env nu + cargo nextest run + # Compile all documentation as in proposals and design documents, placing them under `docs/compiled`. docs: #!/usr/bin/env nu @@ -12,6 +16,8 @@ docs: mv $pdf docs/compiled } | ignore -test: +fmt: #!/usr/bin/env nu - cargo nextest run + cargo fmt + echo "Places where whitespace is at the end of a line:" + rg '\s$' diff --git a/testfiles/bare.ron b/testfiles/bare.ron index 1770e37..a9c97c8 100644 --- a/testfiles/bare.ron +++ b/testfiles/bare.ron @@ -1,12 +1,12 @@ ( [ Read(( - source: File("/home/jade/example/file.png"), - format: Png + source: File("testfiles/juan.png"), + format: Jpeg )), Write(( - target: File("/home/jade/example/out.jpg"), - format: Jpeg + target: File("testfiles/out.png"), + format: Png )) ] ) diff --git a/testfiles/invert.ron b/testfiles/invert.ron index 5f235a9..80179f1 100644 --- a/testfiles/invert.ron +++ b/testfiles/invert.ron @@ -2,7 +2,7 @@ [ Read(( source: File("testfiles/juan.jpg"), - format: Png + format: Jpeg )), Filter(Invert), Write((