From a79a8ebb4ed029b62dbc628fc28e10520a135214 Mon Sep 17 00:00:00 2001 From: "resq-sync[bot]" Date: Wed, 23 Sep 2026 17:26:21 +0000 Subject: [PATCH] chore: sync from monorepo @06b3176 --- .rustfmt.toml | 26 +++++++++++++++++++ .../src/instructions/record_crossing.rs | 4 +-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .rustfmt.toml diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000..81a2ef1 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,26 @@ +# Copyright 2026 ResQ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# rustfmt config for the on-chain programs workspace. +# +# programs/ is synced verbatim to the PUBLIC resq-software/programs repo, but the +# repo-root .rustfmt.toml is NOT part of that sync. Without this file the public +# repo falls back to rustfmt defaults and disagrees with the monorepo on +# formatting (notably `match_block_trailing_comma`), turning the sync's Format +# gate red. Mirroring the root's stable options here -- inside the synced subtree +# -- makes both repositories format identically. The root's nightly-only options +# (imports_granularity, group_imports, wrap_comments, comment_width) are omitted: +# they are silently ignored by the stable rustfmt that both CIs run for programs. +edition = "2021" +match_block_trailing_comma = true diff --git a/resq-airspace/src/instructions/record_crossing.rs b/resq-airspace/src/instructions/record_crossing.rs index 8568fcc..eb0dd4d 100644 --- a/resq-airspace/src/instructions/record_crossing.rs +++ b/resq-airspace/src/instructions/record_crossing.rs @@ -116,7 +116,7 @@ pub fn handler( let mut fee_paid: u64 = 0; match airspace.policy { - AccessPolicy::Open => {} // no permit, no fee + AccessPolicy::Open => {}, // no permit, no fee AccessPolicy::Permit | AccessPolicy::Auction => { let permit = ctx .accounts @@ -147,7 +147,7 @@ pub fn handler( )?; fee_paid = airspace.fee_lamports; } - } + }, // Deny was already handled above. AccessPolicy::Deny => unreachable!(), }