zai-rs 0.5.1

一个 Rust SDK, 用于调用 智谱AI API
Documentation
# Rustfmt configuration for zai-rs
#
# Only stable options are used here so that `cargo fmt` on the stable
# toolchain (what CI runs) actually enforces every rule below. Earlier the
# config relied on nightly-only options (imports_granularity, group_imports,
# wrap_comments, normalize_comments, format_code_in_doc_comments,
# normalize_doc_attributes, control_brace_style, trailing_comma,
# struct_lit_single_line, struct_variant_width, match_arm_blocks,
# blank_lines_*, spaces_around_ranges) that stable rustfmt silently ignores,
# which made the CI formatting check a near no-op. (`force_explicit_abi` was
# also dropped — it is not a recognized rustfmt config key.)

edition = "2024"

# Maximum line width.
max_width = 100

# Indentation: spaces, 4 wide.
hard_tabs = false
tab_spaces = 4

# Unix line endings.
newline_style = "Unix"

# Shorthand: `Foo { x }` instead of `Foo { x: x }`.
use_field_init_shorthand = true

# `?` shorthand instead of `try!(…)`.
use_try_shorthand = true

# Canonical derive ordering and import/module reordering.
merge_derives = true
reorder_imports = true
reorder_modules = true

# Drop redundant nested parens: `(x)` -> `x`.
remove_nested_parens = true

# Width heuristics drive where rustfmt breaks collections/calls.
use_small_heuristics = "Default"

# Trailing comma inside `match` arms.
match_block_trailing_comma = true