rust

Rust惯用模式和约定。

📖 中文导读:Rust惯用模式和约定。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: rust description: Rust idiomatic patterns and conventions.

Conventions

  • Ownership: Minimize cloning, prefer borrowing
  • Traits: Derive Debug, Clone, PartialEq where appropriate
  • Style: Iterators over loops, effective pattern matching

Testing

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn behavior_description() {
        // AAA pattern
    }
}