From 1ffd880cbaf208ab339dd792dd8cad2f4b73a8f2 Mon Sep 17 00:00:00 2001 From: luxean Date: Wed, 11 Feb 2026 22:29:05 +0100 Subject: [PATCH 1/5] ci: add github ci --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b8e39fc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: ci + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + +jobs: + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - run: cargo fmt --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - run: cargo clippy --all-targets --all-features -- -D warnings + + test: + name: Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@stable + - run: cargo test --all-targets --all-features --verbose From 10bc405b2eeda4aa7bdc322df2209782f2c197c9 Mon Sep 17 00:00:00 2001 From: luxean Date: Wed, 11 Feb 2026 22:31:18 +0100 Subject: [PATCH 2/5] chore: remove gitlab related files --- .gitlab-ci.yml | 36 ---------------------- .gitlab/issue_templates/Bug.md | 28 ----------------- .gitlab/issue_templates/Default.md | 36 ---------------------- .gitlab/merge_request_templates/Default.md | 27 ---------------- 4 files changed, 127 deletions(-) delete mode 100644 .gitlab-ci.yml delete mode 100644 .gitlab/issue_templates/Bug.md delete mode 100644 .gitlab/issue_templates/Default.md delete mode 100644 .gitlab/merge_request_templates/Default.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index b84d9e2..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,36 +0,0 @@ -image: "rust:latest" - -variables: - RUSTFLAGS: -D warnings - -default: - before_script: - - rustc --version - - cargo --version - tags: - - shared-fi - -stages: - - build - -build: - stage: build - script: - - cargo build --verbose - -lint: - stage: build - script: - - rustup component add clippy - - cargo clippy --all-targets - -format: - stage: build - script: - - rustup component add rustfmt - - cargo fmt -- --check - -test: - stage: build - script: - - cargo test \ No newline at end of file diff --git a/.gitlab/issue_templates/Bug.md b/.gitlab/issue_templates/Bug.md deleted file mode 100644 index a60a536..0000000 --- a/.gitlab/issue_templates/Bug.md +++ /dev/null @@ -1,28 +0,0 @@ -# Summary - -(Summarize the bug encountered concisely) - - -## Steps to reproduce - -(How one can reproduce the issue - this is very important) - -## What is the current bug behavior? - -(What actually happens) - -## What is the expected correct behavior? - -(What you should see instead) - -## Relevant logs and/or screenshots - -(Paste any relevant logs - use code blocks (```) to format console output, logs, and code, as -it's very hard to read otherwise.) - -## Possible fixes - -(If you can, link to the line of code that might be responsible for the problem) - -/label ~Bug -/label ~Reporter:: diff --git a/.gitlab/issue_templates/Default.md b/.gitlab/issue_templates/Default.md deleted file mode 100644 index f84fbc2..0000000 --- a/.gitlab/issue_templates/Default.md +++ /dev/null @@ -1,36 +0,0 @@ -Quick description of this feature. - -/label ~Reporter:: - -## 👤 User story - -“As a persona, I want_to, so_that.” - - - -## ✔️ Acceptance criteria - -- [ ] - -## ⚙️ Non-Funcional requirements - -- [ ] - -## 🖼️ Design - - diff --git a/.gitlab/merge_request_templates/Default.md b/.gitlab/merge_request_templates/Default.md deleted file mode 100644 index 493f053..0000000 --- a/.gitlab/merge_request_templates/Default.md +++ /dev/null @@ -1,27 +0,0 @@ - - - -Closes #n. - -Quick description of ticket & work. - -## 👉 Why? - -Description of why it's implemented how you've done it. E.g. what -fremework was chosen and why, other technical decisions. - -## 👀 How? - -Technical explanation of how the improvement was achieved. - -## 🖥️ See - -| 🥚 Before | 🐣 After | -| :----------------------------------: | :----------------------------------: | -| replace_with_comment_or_delete | replace_with_comment_or_delete | -| paste_screenshot_of_main_branch_here | paste_screenshot_of_your_branch_here | - -## ⏰ TODOs - -- [ ] todo which the reviewer take look at -- [ ] additional todo which has to be completed before merging From 7d837e701a54bfc0c001669f07f10e1bd03dbd62 Mon Sep 17 00:00:00 2001 From: luxean Date: Wed, 11 Feb 2026 22:50:24 +0100 Subject: [PATCH 3/5] ci: run clippy and tests on windows --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8e39fc..6a3fa69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,10 @@ jobs: clippy: name: Clippy - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v5 - uses: dtolnay/rust-toolchain@stable @@ -34,7 +37,10 @@ jobs: test: name: Tests - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v5 - uses: dtolnay/rust-toolchain@stable From 16b770a33548139c6b5e7be852ccfb6f1f67cb5a Mon Sep 17 00:00:00 2001 From: luxean Date: Wed, 11 Feb 2026 22:51:32 +0100 Subject: [PATCH 4/5] ci: use checkout v6 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a3fa69..8b543d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: name: Rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@stable with: components: rustfmt @@ -29,7 +29,7 @@ jobs: os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@stable with: components: clippy @@ -42,6 +42,6 @@ jobs: os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@stable - run: cargo test --all-targets --all-features --verbose From dc894e9361b10acf5963e25c454bc3011fa22796 Mon Sep 17 00:00:00 2001 From: luxean Date: Sat, 14 Feb 2026 20:26:46 +0100 Subject: [PATCH 5/5] refactor: fix clippy --- lib/ref_tree/src/node_mod/node_to_root_iterator.rs | 4 +--- lib/ref_tree/src/tree_mod/tree.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/ref_tree/src/node_mod/node_to_root_iterator.rs b/lib/ref_tree/src/node_mod/node_to_root_iterator.rs index c167e86..fc5403e 100644 --- a/lib/ref_tree/src/node_mod/node_to_root_iterator.rs +++ b/lib/ref_tree/src/node_mod/node_to_root_iterator.rs @@ -17,9 +17,7 @@ impl Iterator for NodeToRootIterator { fn next(&mut self) -> Option { // Finish if we're at the root. - let Some(current) = self.node.clone() else { - return None; - }; + let current = self.node.clone()?; // Step up the tree. self.node = current diff --git a/lib/ref_tree/src/tree_mod/tree.rs b/lib/ref_tree/src/tree_mod/tree.rs index be01960..e216fe2 100644 --- a/lib/ref_tree/src/tree_mod/tree.rs +++ b/lib/ref_tree/src/tree_mod/tree.rs @@ -17,7 +17,7 @@ pub struct Tree { /// Some -> Tree has at least one node. /// /// Arc - Multi-thread simultaneous access to the root node. - /// RwLock + /// `RwLock` /// - Ability to read from one thread, but write from others without blocking. /// - BE writes when adding size from nodes under root, FE reads with tick/whenever. /// - BE also reads when asking for children or going up the three.