mirror of
https://github.com/wezterm/wezterm.git
synced 2026-11-08 01:21:45 +08:00
style: Add newline after inner attribute for readability (#8130)
Add a newline after inner attributes to make it clear that the attribute applies to the enclosing item rather than the following item.
This commit is contained in:
parent
e019f1b11e
commit
092dcf70d8
@ -1,4 +1,5 @@
|
||||
#![no_std]
|
||||
|
||||
use alloc::borrow::Cow;
|
||||
use core::ops::Range;
|
||||
use level::MAX_DEPTH;
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
//! client and server instances that are built from different versions
|
||||
//! of this code; in this way the client and server can more gracefully
|
||||
//! manage unknown enum variants.
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![allow(clippy::range_plus_one)]
|
||||
|
||||
|
||||
4
deps/freetype/regenerate.sh
vendored
4
deps/freetype/regenerate.sh
vendored
@ -19,8 +19,10 @@ bindgen bindings.h -o src/lib.rs \
|
||||
--raw-line "#![allow(non_upper_case_globals)]" \
|
||||
--raw-line "#![allow(clippy::unreadable_literal)]" \
|
||||
--raw-line "#![allow(clippy::upper_case_acronyms)]" \
|
||||
--raw-line "mod types;" \
|
||||
--raw-line "" \
|
||||
--raw-line "mod fixed_point;" \
|
||||
--raw-line "mod types;" \
|
||||
--raw-line "" \
|
||||
--raw-line "pub use fixed_point::*;" \
|
||||
--raw-line "pub type FT_Int16 = i16;" \
|
||||
--raw-line "pub type FT_UInt16 = u16;" \
|
||||
|
||||
2
deps/freetype/src/lib.rs
vendored
2
deps/freetype/src/lib.rs
vendored
@ -5,8 +5,10 @@
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(clippy::unreadable_literal)]
|
||||
#![allow(clippy::upper_case_acronyms)]
|
||||
|
||||
mod fixed_point;
|
||||
mod types;
|
||||
|
||||
pub use fixed_point::*;
|
||||
pub type FT_Int16 = i16;
|
||||
pub type FT_UInt16 = u16;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![cfg(target_os = "linux")]
|
||||
|
||||
use super::*;
|
||||
|
||||
impl From<&str> for LocalProcessStatus {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![cfg(target_os = "macos")]
|
||||
|
||||
use super::*;
|
||||
use std::ffi::{OsStr, OsString};
|
||||
use std::os::unix::ffi::{OsStrExt, OsStringExt};
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![cfg(windows)]
|
||||
|
||||
use super::*;
|
||||
use ntapi::ntpebteb::PEB;
|
||||
use ntapi::ntpsapi::{
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![allow(clippy::range_plus_one)]
|
||||
|
||||
use super::*;
|
||||
use crate::config::BidiMode;
|
||||
use log::debug;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
// The range_plus_one lint can't see when the LHS is not compatible with
|
||||
// and inclusive range
|
||||
#![allow(clippy::range_plus_one)]
|
||||
|
||||
use super::*;
|
||||
use crate::color::{ColorPalette, RgbColor};
|
||||
use crate::config::{BidiMode, NewlineCanon};
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
//! This example shows how to make a basic widget that accumulates
|
||||
//! text input and renders it to the screen
|
||||
|
||||
#![allow(unused)]
|
||||
|
||||
use termwiz::caps::Capabilities;
|
||||
use termwiz::cell::AttributeChange;
|
||||
use termwiz::color::{AnsiColor, ColorAttribute};
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
// Ideally this would be scoped to WidgetId, but I can't seem to find the
|
||||
// right place for it to take effect
|
||||
#![allow(clippy::new_without_default)]
|
||||
use crate::color::ColorAttribute;
|
||||
use crate::input::InputEvent;
|
||||
use crate::surface::{Change, CursorShape, CursorVisibility, Position, SequenceNo, Surface};
|
||||
|
||||
@ -10,8 +10,10 @@
|
||||
//! You may wish to use `termwiz::escape::parser::Parser` in the
|
||||
//! [termwiz](https://docs.rs/termwiz/) crate if you don't want to have to research
|
||||
//! all those possible escape sequences for yourself.
|
||||
|
||||
#![allow(clippy::upper_case_acronyms)]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use utf8parse::Parser as Utf8Parser;
|
||||
mod enums;
|
||||
use crate::enums::*;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
//! Colors for attributes
|
||||
|
||||
// for FromPrimitive
|
||||
#![allow(clippy::useless_attribute)]
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
//! Model a cell in the terminal display
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use crate::color::{ColorAttribute, PaletteIndex};
|
||||
#[cfg(feature = "use_image")]
|
||||
use crate::image::ImageCell;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub mod emoji;
|
||||
pub mod emoji_presentation;
|
||||
pub mod emoji_variation;
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg_attr(not(feature = "std"), macro_use)]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
mod array;
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
//! This module provides the ability to parse escape sequences and attach
|
||||
//! semantic meaning to them. It can also encode the semantic values as
|
||||
//! escape sequences. It provides encoding and decoding functionality
|
||||
//! only; it does not provide terminal emulation facilities itself.
|
||||
|
||||
// suppress inscrutable useless_attribute clippy that shows up when
|
||||
// using derive(FromPrimitive)
|
||||
#![allow(clippy::useless_attribute)]
|
||||
#![allow(clippy::upper_case_acronyms)]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
//! This module provides the ability to parse escape sequences and attach
|
||||
//! semantic meaning to them. It can also encode the semantic values as
|
||||
//! escape sequences. It provides encoding and decoding functionality
|
||||
//! only; it does not provide terminal emulation facilities itself.
|
||||
|
||||
#[cfg(feature = "tmux_cc")]
|
||||
use crate::tmux_cc::Event;
|
||||
use core::fmt::{Display, Formatter, Result as FmtResult, Write as FmtWrite};
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![allow(clippy::many_single_char_names)]
|
||||
|
||||
#[cfg(feature = "tmux_cc")]
|
||||
use crate::tmux_cc::Event;
|
||||
use crate::{
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
//! Slightly higher level helper for fontconfig
|
||||
|
||||
#![allow(clippy::mutex_atomic)]
|
||||
|
||||
use anyhow::{anyhow, ensure, Error};
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
// The range_plus_one lint can't see when the LHS is not compatible with
|
||||
// and inclusive range
|
||||
#![allow(clippy::range_plus_one)]
|
||||
|
||||
use mux::pane::Pane;
|
||||
use std::cmp::Ordering;
|
||||
use std::ops::Range;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
use crate::color::LinearRgba;
|
||||
use crate::customglyph::{BlockKey, Poly};
|
||||
use crate::glyphcache::CachedGlyph;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![allow(clippy::range_plus_one)]
|
||||
|
||||
use super::renderstate::*;
|
||||
use super::utilsprites::RenderMetrics;
|
||||
use crate::colorease::ColorEase;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![cfg(unix)]
|
||||
|
||||
use anyhow::Context;
|
||||
use libc::pid_t;
|
||||
use std::io::Write;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use crate::line::CellRef;
|
||||
use alloc::borrow::Cow;
|
||||
use core::cmp::min;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#![cfg(all(not(target_os = "macos"), not(windows)))]
|
||||
//! See <https://developer.gnome.org/notification-spec/>
|
||||
|
||||
#![cfg(all(not(target_os = "macos"), not(windows)))]
|
||||
|
||||
use crate::ToastNotification;
|
||||
use futures_util::stream::{abortable, StreamExt};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![cfg(target_os = "macos")]
|
||||
|
||||
use crate::ToastNotification;
|
||||
use block2::{Block, RcBlock};
|
||||
use objc2::rc::Retained;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use std::collections::HashMap;
|
||||
use wezterm_input_types::PhysKeyCode;
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![allow(unexpected_cfgs)] // <https://github.com/SSheldon/rust-objc/issues/125>
|
||||
|
||||
use cocoa::base::{id, nil};
|
||||
use cocoa::foundation::NSString;
|
||||
use objc::rc::StrongPtr;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![cfg(all(unix, not(target_os = "macos")))]
|
||||
|
||||
pub mod connection;
|
||||
pub mod cursor;
|
||||
pub mod keyboard;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
use libc::c_void;
|
||||
use xcb::ffi::*;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#![cfg(all(unix, not(target_os = "macos")))]
|
||||
|
||||
//! <https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.Settings.xml>
|
||||
|
||||
#![cfg(all(unix, not(target_os = "macos")))]
|
||||
|
||||
use crate::{Appearance, Connection, ConnectionOps};
|
||||
use anyhow::Context;
|
||||
use futures_lite::future::FutureExt;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user