rename: crate::wchar::prelude -> crate::prelude

Having the prelude in wchar is not great. The wchar module was empty
except for the prelude, and its prelude included things from wutil.

Having a top-level prelude module in the main crate resolves this. It
allows us to completely remove the wchar module, and a top-level prelude
module makes more sense conceptually. Putting non-wchar things into the
prelude also becomes more sensible, if we ever want to do that.

Closes #12182
This commit is contained in:
Daniel Rainer
2025-12-18 00:34:41 +01:00
committed by Johannes Altmanninger
parent 3b976a3364
commit b62a312cba
77 changed files with 113 additions and 115 deletions

View File

@@ -328,7 +328,7 @@ fn next(&mut self) -> Option<Self::Item> {
#[cfg(test)]
mod tests {
use super::{DirEntryType, DirIter};
use crate::wchar::prelude::*;
use crate::prelude::*;
use fish_wchar::L;
use nix::sys::stat::Mode;
use std::fs::File;

View File

@@ -2,7 +2,7 @@
#[cfg(feature = "localize-messages")]
use crate::env::{EnvStack, Environment};
use crate::wchar::prelude::*;
use crate::prelude::*;
use once_cell::sync::Lazy;
#[cfg(feature = "localize-messages")]
@@ -386,8 +386,8 @@ macro_rules! wgettext_fmt {
#[cfg(test)]
mod tests {
use super::LocalizableString;
use crate::prelude::*;
use crate::tests::prelude::*;
use crate::wchar::prelude::*;
#[test]
#[serial]

View File

@@ -475,8 +475,8 @@ mod tests {
use super::{normalize_path, wbasename, wdirname, wstr_offset_in, wwrite_to_fd};
use crate::common::bytes2wcstring;
use crate::fds::AutoCloseFd;
use crate::prelude::*;
use crate::tests::prelude::*;
use crate::wchar::prelude::*;
use libc::{O_CREAT, O_RDWR, O_TRUNC, SEEK_SET};
use rand::Rng;
use std::{ffi::CString, ptr};

View File

@@ -1,5 +1,5 @@
pub use super::errors::Error;
use crate::wchar::prelude::*;
use crate::prelude::*;
use num_traits::{NumCast, PrimInt};
use std::default::Default;
use std::iter::{Fuse, Peekable};