Replace appearance wildcard imports with explicit dependencies

This commit is contained in:
skylartaylor
2026-10-22 16:03:42 +02:00
parent 230bdf2277
commit d6e7a9eec5
3 changed files with 15 additions and 6 deletions
+10 -4
View File
@@ -131,9 +131,9 @@ impl Drop for Watcher {
#[cfg(all(unix, not(target_os = "macos"), not(target_arch = "wasm32")))]
mod portal {
use super::*;
use super::{Shared, Theme};
use futures_lite::StreamExt;
use std::time::Duration;
use std::{sync::Arc, time::Duration};
use zbus::zvariant::{OwnedValue, Value};
const DEST: &str = "org.freedesktop.portal.Desktop";
const PATH: &str = "/org/freedesktop/portal/desktop";
@@ -322,7 +322,13 @@ mod portal {
Ok(())
}
use super::*;
use super::{GNOME, STANDARD, combined, decode, reply};
use crate::appearance::{Theme, Watcher};
use std::{
sync::{Arc, atomic::Ordering},
time::Duration,
};
use zbus::zvariant::Value;
#[test]
fn no_preference_is_an_answer_and_gnome_only_fills_missing_preference() {
assert_eq!(combined(None, None), None);
@@ -518,7 +524,7 @@ impl egui::Plugin for NativeWindowTheme {
#[cfg(all(test, feature = "egui", unix, not(target_os = "macos"), not(target_arch = "wasm32")))]
mod native_window_tests {
use super::*;
use super::{Theme, sync_native_window_theme};
fn pass(ctx: &egui::Context, observed: Option<Theme>, preference: egui::ThemePreference) -> Vec<egui::SystemTheme> {
let mut output = ctx.run_ui(egui::RawInput::default(), |ui| {
sync_native_window_theme(ui.ctx(), observed);
@@ -1,5 +1,8 @@
//! Private-bus regression based on PdfCraft's queued-update test (storytold/pdfcraft#881).
use super::*;
use super::{DEST, GNOME, IFACE, KEY, PATH, STANDARD, watch_connection};
use crate::appearance::{Theme, Watcher};
use std::time::Duration;
use zbus::zvariant::{OwnedValue, Value};
#[test]
#[ignore = "requires dbus-daemon; private session bus only"]
+1 -1
View File
@@ -36,7 +36,7 @@ pub(crate) async fn capture(program: &std::path::Path, args: &[&str], timeout: s
}
#[cfg(all(test, feature = "appearance", unix, not(target_os = "macos")))]
mod tests {
use super::*;
use super::capture;
#[test]
fn capture_checks_exit_status_size_and_deadline() {
use std::time::{Duration, Instant};