style: 对跨实例同步移植代码执行 cargo fmt
Sync source to CNB / Sync Git ref (push) Has been cancelled

This commit is contained in:
AxTps committed 2026-10-04 07:42:48 +08:00
1 parent 6e9485c2f5
commit fae16a0184
21 files changed
+35 -40

No files matched your search

@@ -200,4 +200,4 @@ pub(super) fn canonical_values_equal(
}
_ => left == right,
}
}
}
@@ -204,4 +204,4 @@ pub(super) const SETTINGS: &[SupportedSetting] = &[
BOOL,
ValueEncoding::Bool,
),
];
];
@@ -191,4 +191,4 @@ pub(super) const SETTINGS: &[SupportedSetting] = &[
SettingEditor::Enum(CHAT_PREVIEW),
ValueEncoding::ChatPreview,
),
];
];
@@ -410,4 +410,4 @@ pub(super) const SETTINGS: &[SupportedSetting] = &[
"26.3",
"26.3"
),
];
];
@@ -124,4 +124,4 @@ pub(in crate::api::instance) const LEGACY_DATA_VERSIONS: phf::Map<&str, u32> = p
"1.10" => 510,
"1.10-pre2" => 507,
"1.10-pre1" => 506,
};
};
@@ -252,4 +252,4 @@ pub(super) const KNOWN_VANILLA_KEYS: &[&str] = &[
"modelPart_right_pants_leg",
"modelPart_hat",
"fullscreenResolution",
];
];
@@ -109,4 +109,4 @@ pub(in crate::api::instance) const LEGACY_KEY_BINDINGS: &[(i32, &str)] = &[
(211, "key.keyboard.delete"),
(219, "key.keyboard.left.win"),
(220, "key.keyboard.right.win"),
];
];
@@ -174,4 +174,4 @@ pub(super) const SETTINGS: &[SupportedSetting] = &[
UNIT_INTERVAL,
ValueEncoding::Decimal,
),
];
];
@@ -447,4 +447,4 @@ pub(super) const SETTINGS: &[SupportedSetting] = &[
BOOL,
ValueEncoding::Bool,
),
];
];
@@ -75,4 +75,4 @@ const CATALOG_REVISION: u32 = 6;
const MAX_OPTIONS_BYTES: usize = 2 * 1024 * 1024;
const MAX_OPTIONS_LINES: usize = 16_384;
const MAX_KEY_BYTES: usize = 1_024;
const MAX_VALUE_BYTES: usize = 32 * 1024;
const MAX_VALUE_BYTES: usize = 32 * 1024;
@@ -357,4 +357,4 @@ pub(super) async fn read_document(
let bytes = io::read(path).await?;
let document = GameOptionsDocument::parse(&bytes)?;
Ok((document, bytes))
}
}
@@ -29,4 +29,4 @@ pub(crate) use self::orchestration::{
monitor_persisted_processes, prepare_instance_update,
reconcile_instance_after_pack_update_with_state,
remove_generated_instance_files,
};
};
@@ -28,7 +28,9 @@ use super::hotbars::{
read_hotbar_state, reconcile_hotbar, regenerate_hotbars,
write_hotbar_state,
};
use super::pending::{self, PendingAction, PendingChange, SyncedOptionJoinResolution};
use super::pending::{
self, PendingAction, PendingChange, SyncedOptionJoinResolution,
};
use super::{COMMAND_HISTORY_FILE, HOTBAR_FILE};
#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize)]
@@ -981,12 +983,11 @@ pub async fn reconcile_all() -> crate::Result<()> {
pub(crate) async fn monitor_persisted_processes() -> crate::Result<()> {
let state = State::get().await?;
let instance_ids =
sqlx::query_scalar::<_, String>(
"SELECT DISTINCT instance_id FROM processes",
)
.fetch_all(&state.pool)
.await?;
let instance_ids = sqlx::query_scalar::<_, String>(
"SELECT DISTINCT instance_id FROM processes",
)
.fetch_all(&state.pool)
.await?;
for instance_id in instance_ids {
tokio::spawn(async move {
loop {
@@ -101,4 +101,4 @@ pub(in crate::api::instance) async fn contains(
Ok(read(state).await?.iter().any(|change| {
change.instance_id == instance_id && change.option == option
}))
}
}