Repository: robustmq/robustmq (language: rust)

Issue:
[Build] Change rust toochain to stable version
### Have you checked the documentation for submitting an Issue?

- [X] Yes.

### What type of enhancement is this?

Build

### What does the enhancement do?

As refer to title

### Implementation challenges

No.

### Are you willing to submit PR?

- [X] Yes. I would be willing to submit a PR with guidance from the RobustMQ community to improve.
- [ ] No. I cannot submit a PR at this time.


Discussion / hints:

Fix patch:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1b3b4a1e6..82c24971d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -49,7 +49,7 @@ repos:
       - id: cargo-fmt-auto
         name: cargo fmt auto
         description: Format files with rustfmt automatically.
-        entry: bash -c 'cargo fmt'
+        entry: bash -c 'cargo fmt --all'
         language: rust
         files: \.rs$
         args: []
diff --git a/docs/images/WechatGroup.jpg b/docs/images/WechatGroup.jpg
index f534b4fb0..affa81c42 100644
Binary files a/docs/images/WechatGroup.jpg and b/docs/images/WechatGroup.jpg differ
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index 2d7184b06..f119d2124 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -14,4 +14,7 @@
 
 [toolchain]
 channel = "stable"
-components = [ "rustfmt", "rust-src", "miri", "rust-analyzer"]
+components = [ "rustfmt", "rust-src", "rust-analyzer"]
+# The component named miri is supported in the nightly version
+# so we will use it until the stable version can be supported.
+# components = [ "rustfmt", "rust-src", "miri", "rust-analyzer"]
diff --git a/rustfmt.toml b/rustfmt.toml
index 81537f5c3..57179978f 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -13,5 +13,7 @@
 # limitations under the License.
 
 edition = "2024"
-group_imports = "StdExternalCrate"
-imports_granularity = "Module"
+# These command are only supported in the nightly version
+# We use these command when they are supporting in the stable version
+# group_imports = "StdExternalCrate"
+# imports_granularity = "Module"


Test patch:
diff --git a/tests/tests/journal_client/client_test.rs b/tests/tests/journal_client/client_test.rs
index cf791d89b..b41b4ad74 100644
--- a/tests/tests/journal_client/client_test.rs
+++ b/tests/tests/journal_client/client_test.rs
@@ -143,7 +143,7 @@ mod tests {
         let res = res_opt.unwrap();
         assert_eq!(res.len(), 3);
 
-        assert_eq!(res.get(0).unwrap().offset, 2);
+        assert_eq!(res.first().unwrap().offset, 2);
         assert_eq!(res.get(1).unwrap().offset, 3);
         assert_eq!(res.get(2).unwrap().offset, 4);