one use per crate, and write the rule down

`fs.rs` came out of the move with two ungated `use hbb_common::` statements,
because the original single `use crate::{...}` had to give up `message_proto`
to the new crate and the rest was left in a second block. Fold it back into one.

A scan of the whole tree for the same shape finds nothing else: every other file
with more than one top-level `use base::` or `use hbb_common::` is split by a
`#[cfg]` that does not cover the whole block, or by `pub use` next to `use`.
Those are the cases that cannot merge, so AGENTS.md now states both the rule and
the exemption.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab
This commit is contained in:
rustdesk
2026-09-08 11:31:47 +08:00
parent c7c2f63323
commit 65766e9b41
2 changed files with 31 additions and 1 deletions

View File

@@ -16,11 +16,13 @@ use tokio::{
};
use crate::message_proto::*;
use hbb_common::{anyhow::anyhow, bail, get_version_number, ResultType, Stream};
// https://doc.rust-lang.org/std/os/windows/fs/trait.MetadataExt.html
use hbb_common::{
anyhow::anyhow,
bail,
compress::{compress, decompress},
config::Config,
get_version_number, ResultType, Stream,
};
static NEXT_JOB_ID: AtomicI32 = AtomicI32::new(1);