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
@@ -3,14 +3,14 @@
|
||||
//! C-ABI plumbing (`C`, `CValue`, `cval`, `ghostty.h` sync tests) is not
|
||||
//! ported; the enums keep their C integer discriminants via `as i32`.
|
||||
|
||||
use crate::surface::{ChildExited, RendererHealth, Scrollbar};
|
||||
use ghostty_config::config::Config;
|
||||
use ghostty_config::types_b::Duration;
|
||||
use ghostty_input::binding::Trigger;
|
||||
use ghostty_vt::mouse_shape::MouseShape;
|
||||
use ghostty_vt::osc::ProgressReport;
|
||||
use std::sync::Arc;
|
||||
|
||||
use ghostty_config::{config::Config, types_b::Duration};
|
||||
use ghostty_input::binding::Trigger;
|
||||
use ghostty_vt::{mouse_shape::MouseShape, osc::ProgressReport};
|
||||
|
||||
use crate::surface::{ChildExited, RendererHealth, Scrollbar};
|
||||
|
||||
/// The target for an action. This is generally the thing that had focus
|
||||
/// while the action was made but the concept of "focus" is not guaranteed
|
||||
/// since actions can also be triggered by timers, scripts, etc.
|
||||
|
||||
@@ -13,6 +13,14 @@ pub mod surface;
|
||||
|
||||
pub use action::{Action, Target};
|
||||
pub use structs::{
|
||||
Clipboard, ClipboardContent, ClipboardRequest, ClipboardRequestType, ColorScheme, ContentScale,
|
||||
CursorPos, ImePos, Selection, SurfaceSize,
|
||||
Clipboard,
|
||||
ClipboardContent,
|
||||
ClipboardRequest,
|
||||
ClipboardRequestType,
|
||||
ColorScheme,
|
||||
ContentScale,
|
||||
CursorPos,
|
||||
ImePos,
|
||||
Selection,
|
||||
SurfaceSize,
|
||||
};
|
||||
@@ -15,16 +15,24 @@
|
||||
//!
|
||||
//! See `docs/rewrite/notes/ghostty-apprt-gtk.md` for the full spec.
|
||||
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
use std::{rc::Rc, sync::Arc};
|
||||
|
||||
use crate::action::{Action, Target};
|
||||
use crate::structs::{
|
||||
Clipboard, ClipboardRequest, ColorScheme, ContentScale, CursorPos, ImePos, SurfaceSize,
|
||||
};
|
||||
use ghostty_config::config::Config;
|
||||
use ghostty_input::{Mods, MouseButton, MouseButtonState, ScrollMods};
|
||||
|
||||
use crate::{
|
||||
action::{Action, Target},
|
||||
structs::{
|
||||
Clipboard,
|
||||
ClipboardRequest,
|
||||
ColorScheme,
|
||||
ContentScale,
|
||||
CursorPos,
|
||||
ImePos,
|
||||
SurfaceSize,
|
||||
},
|
||||
};
|
||||
|
||||
/// Identifier for a core surface (Zig: `*CoreSurface` pointer). Allocated by
|
||||
/// this crate for each GTK surface; core stores it in its `Target::Surface`.
|
||||
pub type SurfaceId = u64;
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
//! Port of `surface.zig`: messages sent from the core to a surface's apprt.
|
||||
|
||||
use crate::structs::Clipboard;
|
||||
use ghostty_config::config::Config;
|
||||
use ghostty_config::types_a::WorkingDirectory;
|
||||
use ghostty_datastruct::MessageData;
|
||||
use ghostty_datastruct::blocking_queue::Timeout;
|
||||
use ghostty_vt::mouse_shape::MouseShape;
|
||||
use ghostty_vt::osc::ProgressReport;
|
||||
use ghostty_vt::osc::color::ColoredTarget;
|
||||
use std::sync::Arc;
|
||||
|
||||
use ghostty_config::{config::Config, types_a::WorkingDirectory};
|
||||
use ghostty_datastruct::{MessageData, blocking_queue::Timeout};
|
||||
use ghostty_vt::{
|
||||
mouse_shape::MouseShape,
|
||||
osc::{ProgressReport, color::ColoredTarget},
|
||||
};
|
||||
|
||||
use crate::structs::Clipboard;
|
||||
|
||||
/// Represents a write request. Magic number comes from the max size
|
||||
/// we want this union to be.
|
||||
pub type WriteReq = MessageData<u8, 255>;
|
||||
@@ -233,9 +234,10 @@ pub fn new_config(config: &Config, context: NewSurfaceContext, prev_pwd: Option<
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::cell::RefCell;
|
||||
|
||||
use super::*;
|
||||
|
||||
struct Rec(RefCell<Vec<(u32, bool)>>);
|
||||
impl AppMailbox<u32> for Rec {
|
||||
fn push_surface_message(&self, s: u32, m: Message, _t: Timeout) -> usize {
|
||||
|
||||
Reference in new issue
Block a user