Browse Source

Use nightly rustfmt in CI (#15188)

As we use some nightly only options, e.g. to group and sort imports
consistently.
tags/v1.79.0rc1
Erik Johnston 1 year ago
committed by GitHub
parent
commit
242d2a27ce
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 2 deletions
  1. +2
    -1
      .github/workflows/tests.yml
  2. +1
    -0
      changelog.d/15188.misc
  3. +1
    -0
      rust/benches/evaluator.rs
  4. +1
    -1
      rust/src/push/evaluator.rs

+ 2
- 1
.github/workflows/tests.yml View File

@@ -156,7 +156,8 @@ jobs:
# We pin to a specific commit for paranoia's sake.
uses: dtolnay/rust-toolchain@e12eda571dc9a5ee5d58eecf4738ec291c66f295
with:
toolchain: 1.58.1
# We use nightly so that it correctly groups together imports
toolchain: nightly-2022-12-01
components: rustfmt
- uses: Swatinem/rust-cache@v2



+ 1
- 0
changelog.d/15188.misc View File

@@ -0,0 +1 @@
Use nightly rustfmt in CI.

+ 1
- 0
rust/benches/evaluator.rs View File

@@ -14,6 +14,7 @@

#![feature(test)]
use std::collections::BTreeSet;

use synapse::push::{
evaluator::PushRuleEvaluator, Condition, EventMatchCondition, FilteredPushRules, JsonValue,
PushRules, SimpleJsonValue,


+ 1
- 1
rust/src/push/evaluator.rs View File

@@ -15,7 +15,6 @@
use std::borrow::Cow;
use std::collections::BTreeMap;

use crate::push::{EventMatchPatternType, JsonValue};
use anyhow::{Context, Error};
use lazy_static::lazy_static;
use log::warn;
@@ -27,6 +26,7 @@ use super::{
Action, Condition, ExactEventMatchCondition, FilteredPushRules, KnownCondition,
SimpleJsonValue,
};
use crate::push::{EventMatchPatternType, JsonValue};

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


Loading…
Cancel
Save