Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 242d2a2

Browse files
authored
Use nightly rustfmt in CI (#15188)
As we use some nightly only options, e.g. to group and sort imports consistently.
1 parent 6b6e91e commit 242d2a2

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ jobs:
156156
# We pin to a specific commit for paranoia's sake.
157157
uses: dtolnay/rust-toolchain@e12eda571dc9a5ee5d58eecf4738ec291c66f295
158158
with:
159-
toolchain: 1.58.1
159+
# We use nightly so that it correctly groups together imports
160+
toolchain: nightly-2022-12-01
160161
components: rustfmt
161162
- uses: Swatinem/rust-cache@v2
162163

changelog.d/15188.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use nightly rustfmt in CI.

rust/benches/evaluator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#![feature(test)]
1616
use std::collections::BTreeSet;
17+
1718
use synapse::push::{
1819
evaluator::PushRuleEvaluator, Condition, EventMatchCondition, FilteredPushRules, JsonValue,
1920
PushRules, SimpleJsonValue,

rust/src/push/evaluator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use std::borrow::Cow;
1616
use std::collections::BTreeMap;
1717

18-
use crate::push::{EventMatchPatternType, JsonValue};
1918
use anyhow::{Context, Error};
2019
use lazy_static::lazy_static;
2120
use log::warn;
@@ -27,6 +26,7 @@ use super::{
2726
Action, Condition, ExactEventMatchCondition, FilteredPushRules, KnownCondition,
2827
SimpleJsonValue,
2928
};
29+
use crate::push::{EventMatchPatternType, JsonValue};
3030

3131
lazy_static! {
3232
/// Used to parse the `is` clause in the room member count condition.

0 commit comments

Comments
 (0)