[PR #946] [MERGED] Resolve rust clippy warnings #4447

Closed
opened 2026-03-23 21:37:51 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/946
Author: @gabrielztk
Created: 8/31/2022
Status: Merged
Merged: 9/1/2022
Merged by: @appflowy

Base: mainHead: resolve_clippy_warnings


📝 Commits (10+)

  • 8b900ef refactor: avoid using collect() when not needed
  • 8543422 refactor: The user might expect to be able
  • 6d9a765 refactor: using clone on type indextree::NodeId
  • 41fa127 refactor: remove intermediary
  • d011bd5 refactor: using clone on type indextree::NodeId
  • baa3fdd refactor: unneeded return statement
  • 34220d7 refactor: ok_or_else avoids executing a
  • 5616865 refactor: dereferenced by the compiler
  • a2615ba refactor: user enumeration for index
  • e4a84c7 refactor: using clone on type usize

📊 Changes

5 files changed (+34 additions, -30 deletions)

View changed files

📝 frontend/rust-lib/flowy-grid/src/services/group/configuration.rs (+5 -4)
📝 shared-lib/lib-ot/src/core/document/attributes.rs (+6 -0)
📝 shared-lib/lib-ot/src/core/document/document.rs (+15 -12)
📝 shared-lib/lib-ot/src/core/document/position.rs (+2 -1)
📝 shared-lib/lib-ot/src/core/document/transaction.rs (+6 -13)

📄 Description

Resolved warnings given by clippy, and refactored some of the affected snippets so they would be more inline with Cascade Notation (most commit messages pertain to the warning that section of code gave)

I began this task based on #221, but it has already been closed.

Only one warning was left, as resolving it, from what I understood, would change the projects architecture

warning: module has the same name as its containing module
--> lib-ot/src/core/document/mod.rs:2:1
|
2 | mod document;
| ^^^^^^^^^^^^^
|
= note: #[warn(clippy::module_inception)] on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/946 **Author:** [@gabrielztk](https://github.com/gabrielztk) **Created:** 8/31/2022 **Status:** ✅ Merged **Merged:** 9/1/2022 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `resolve_clippy_warnings` --- ### 📝 Commits (10+) - [`8b900ef`](https://github.com/AppFlowy-IO/AppFlowy/commit/8b900eff6c0151bee7f230e413c3274b3ba4bfce) refactor: avoid using `collect()` when not needed - [`8543422`](https://github.com/AppFlowy-IO/AppFlowy/commit/85434229a4dfb05b1b24ad024b3ce229d1b39bcb) refactor: The user might expect to be able - [`6d9a765`](https://github.com/AppFlowy-IO/AppFlowy/commit/6d9a7654c9335fe397f1ec8593125cb737b4130d) refactor: using `clone` on type `indextree::NodeId` - [`41fa127`](https://github.com/AppFlowy-IO/AppFlowy/commit/41fa1278551d2f28df4a71a4cb6df57f5fe35691) refactor: remove intermediary - [`d011bd5`](https://github.com/AppFlowy-IO/AppFlowy/commit/d011bd52d18bf2baf026dff7c1238153da7f838d) refactor: using `clone` on type `indextree::NodeId` - [`baa3fdd`](https://github.com/AppFlowy-IO/AppFlowy/commit/baa3fdd2b0768905e7073f9c6386cdd2e6b25fa5) refactor: unneeded `return` statement - [`34220d7`](https://github.com/AppFlowy-IO/AppFlowy/commit/34220d7a4fab36c04f825874d1c2d7232b040062) refactor: ok_or_else avoids executing a - [`5616865`](https://github.com/AppFlowy-IO/AppFlowy/commit/56168659b35eb1a94c94489c8b12dcbe5db8ceee) refactor: dereferenced by the compiler - [`a2615ba`](https://github.com/AppFlowy-IO/AppFlowy/commit/a2615baad0f171fc021cf6496c9b22dfac4dbc44) refactor: user enumeration for index - [`e4a84c7`](https://github.com/AppFlowy-IO/AppFlowy/commit/e4a84c7b4d7b233ce3b339b673cbada7d7291202) refactor: using `clone` on type `usize` ### 📊 Changes **5 files changed** (+34 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `frontend/rust-lib/flowy-grid/src/services/group/configuration.rs` (+5 -4) 📝 `shared-lib/lib-ot/src/core/document/attributes.rs` (+6 -0) 📝 `shared-lib/lib-ot/src/core/document/document.rs` (+15 -12) 📝 `shared-lib/lib-ot/src/core/document/position.rs` (+2 -1) 📝 `shared-lib/lib-ot/src/core/document/transaction.rs` (+6 -13) </details> ### 📄 Description Resolved warnings given by clippy, and refactored some of the affected snippets so they would be more inline with Cascade Notation (most commit messages pertain to the warning that section of code gave) I began this task based on #221, but it has already been closed. Only one warning was left, as resolving it, from what I understood, would change the projects architecture warning: module has the same name as its containing module --> lib-ot/src/core/document/mod.rs:2:1 | 2 | mod document; | ^^^^^^^^^^^^^ | = note: `#[warn(clippy::module_inception)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 21:37:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#4447
No description provided.