1
0
Fork 0
forked from wry/wry

all: replace debug_fn with fmt::from_fn

This commit is contained in:
Julian Orth 2026-02-13 11:13:37 +01:00
parent 0932ad11b5
commit b3c46bf52d
11 changed files with 41 additions and 70 deletions

View file

@ -2,11 +2,11 @@ use {
crate::{
cli::{GlobalArgs, IdleArgs, duration::parse_duration},
tools::tool_client::{Handle, ToolClient, with_tool_client},
utils::{debug_fn::debug_fn, stack::Stack},
utils::stack::Stack,
wire::{JayIdleId, WlSurfaceId, jay_compositor, jay_idle},
},
clap::{Args, Subcommand},
std::{cell::Cell, rc::Rc},
std::{cell::Cell, fmt, rc::Rc},
};
#[derive(Subcommand, Debug, Default)]
@ -105,7 +105,7 @@ impl Idle {
});
tc.round_trip().await;
let interval = |iv: u64| {
debug_fn(move |f| {
fmt::from_fn(move |f| {
let minutes = iv / 60;
let seconds = iv % 60;
if minutes == 0 && seconds == 0 {

View file

@ -7,9 +7,7 @@ use {
ifs::wl_output::BlendSpace,
scale::Scale,
tools::tool_client::{Handle, ToolClient, with_tool_client},
utils::{
debug_fn::debug_fn, errorfmt::ErrorFmt, ordered_float::F64, transform_ext::TransformExt,
},
utils::{errorfmt::ErrorFmt, ordered_float::F64, transform_ext::TransformExt},
wire::{JayRandrId, jay_compositor, jay_randr},
},
clap::{
@ -21,7 +19,7 @@ use {
linearize::LinearizeExt,
std::{
cell::RefCell,
fmt::{Display, Formatter},
fmt::{self, Display, Formatter},
rc::Rc,
str::FromStr,
time::Duration,
@ -1067,7 +1065,7 @@ impl Randr {
if let Some(p) = &o.native_gamut {
println!(
" native gamut:{}",
debug_fn(|f| {
fmt::from_fn(|f| {
if o.use_native_gamut {
f.write_str(" (used for default color space)")?;
}