Repository: robustmq/robustmq (language: rust)

Issue:
build: Review use of nightly toolchain
### What type of enhancement is this?

Toolchain, Tech debt reduction

### What does the enhancement do?

There's not a good justification for the use of the nightly toolchain at the moment. We should review whether nightly is really needed.

### Implementation challenges

- [ ] Update CI should we switch from nightly to stable (ie. remove `+nightly` from the fmt check script)


Discussion / hints:
@LYZJU2019 I think you can try it.

Sounds good! I can take a look.

Fix patch:
diff --git a/.github/actions/setup-builder/action.yaml b/.github/actions/setup-builder/action.yaml
index 2d11b1da6..e2539fe75 100644
--- a/.github/actions/setup-builder/action.yaml
+++ b/.github/actions/setup-builder/action.yaml
@@ -32,7 +32,7 @@ runs:
         apt-get install -y cmake
     - uses: actions-rs/toolchain@v1
       with:
-        toolchain: nightly-2024-11-08
+        toolchain: stable
         default: true
     - name: configure cargo cache
       uses: actions/cache@v4
diff --git a/.github/workflows/apidoc.yml b/.github/workflows/apidoc.yml
index f15a9412d..46a18b00c 100644
--- a/.github/workflows/apidoc.yml
+++ b/.github/workflows/apidoc.yml
@@ -27,7 +27,7 @@ on:
 name: Build API docs
 
 env:
-  RUST_TOOLCHAIN: nightly-2023-12-19
+  RUST_TOOLCHAIN: stable
 
 jobs:
   apidoc:
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index 74fc8b383..2d7184b06 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -13,5 +13,5 @@
 # limitations under the License.
 
 [toolchain]
-channel = "nightly-2024-11-08"
+channel = "stable"
 components = [ "rustfmt", "rust-src", "miri", "rust-analyzer"]
diff --git a/rustfmt.toml b/rustfmt.toml
index bb6f5dec0..81537f5c3 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -12,5 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+edition = "2024"
 group_imports = "StdExternalCrate"
-imports_granularity = "Module"
\ No newline at end of file
+imports_granularity = "Module"


Test patch: