style: apply nightly rustfmt import grouping across the workspace
rustfmt.toml sets group_imports, imports_granularity and imports_layout, which are nightly-only; agents formatted with stable rustfmt, which ignored them. This is a formatting-only pass with `cargo +nightly fmt`. Test Plan: - cargo clippy --workspace --all-targets -- -D warnings - cargo test --workspace
This commit is contained in:
1 parent
3fd4ea6ae9
commit
126da77a37
259 files changed
+2495
-1547
No files matched your search
@@ -1,9 +1,11 @@
|
||||
//! Minimal `--key=value` option parsing (the subset of `cli/args.zig` used by
|
||||
//! the benchmark and synthetic CLIs).
|
||||
use std::collections::HashMap;
|
||||
use std::fs::File;
|
||||
use std::io::{self, Read};
|
||||
use std::str::FromStr;
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
fs::File,
|
||||
io::{self, Read},
|
||||
str::FromStr,
|
||||
};
|
||||
|
||||
/// Parsed `--key[=value]` arguments.
|
||||
#[derive(Debug, Default)]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! The individual benchmarks (ports of `benchmark/*.zig`) and the CLI action
|
||||
//! dispatch (`benchmark/cli.zig`).
|
||||
use crate::args::{Args, data_file, read_short};
|
||||
use crate::benchmark::{Benchmark, BenchmarkFailed, Result, RunMode, RunResult, run};
|
||||
use std::{hint::black_box, io::Read};
|
||||
|
||||
use ghostty_terminal::{
|
||||
point::{Coordinate, Point},
|
||||
render::RenderState,
|
||||
@@ -14,8 +14,11 @@ use ghostty_vt::{
|
||||
stream::{Action, Handler, Stream},
|
||||
utf8_decoder::Utf8Decoder,
|
||||
};
|
||||
use std::hint::black_box;
|
||||
use std::io::Read;
|
||||
|
||||
use crate::{
|
||||
args::{Args, data_file, read_short},
|
||||
benchmark::{Benchmark, BenchmarkFailed, Result, RunMode, RunResult, run},
|
||||
};
|
||||
|
||||
const CHUNK: usize = 4096;
|
||||
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
//! `ghostty-synthetic +<ascii|utf8|osc> [--option=value ...]`: endless
|
||||
//! synthetic data on stdout (port of `synthetic/main.zig`).
|
||||
use std::{
|
||||
io::{BufWriter, Write},
|
||||
process::ExitCode,
|
||||
};
|
||||
|
||||
use ghostty_bench::{
|
||||
args::Args,
|
||||
synthetic::{OscStyle, Rng, run_ascii, run_osc, run_sgr, run_utf8},
|
||||
};
|
||||
use std::io::{BufWriter, Write};
|
||||
use std::process::ExitCode;
|
||||
|
||||
fn run() -> Result<(), String> {
|
||||
let argv: Vec<String> = std::env::args().skip(1).collect();
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
//! `ghostty-bench +<action> [--option=value ...]` (port of `main_bench.zig`).
|
||||
use ghostty_bench::{args::Args, benches};
|
||||
use std::process::ExitCode;
|
||||
|
||||
use ghostty_bench::{args::Args, benches};
|
||||
|
||||
fn main() -> ExitCode {
|
||||
let argv: Vec<String> = std::env::args().skip(1).collect();
|
||||
let mut action = None;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
//! Synthetic data generators (port of `ZIG/src/synthetic`): random bytes,
|
||||
//! UTF-8 and OSC sequences, used to feed the benchmarks.
|
||||
use ghostty_vt::string_encoding::url_percent_encode;
|
||||
use std::io::{self, Write};
|
||||
|
||||
use ghostty_vt::string_encoding::url_percent_encode;
|
||||
|
||||
/// xoshiro256++ (what Zig's `std.Random.DefaultPrng` is).
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Rng {
|
||||
@@ -666,9 +667,10 @@ fn finished(r: io::Result<usize>) -> io::Result<bool> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use ghostty_vt::osc::Parser;
|
||||
|
||||
use super::*;
|
||||
|
||||
const SEED: u64 = 0xC0FFEEEEEEEEEEEE;
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user