Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions src/css/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,6 @@ impl<'bump, T: DeepClone<'bump>> DeepClone<'bump> for &'bump [T] {
}
}

impl<'bump, T: DeepClone<'bump>> DeepClone<'bump> for ArrayList<'bump, T> {
#[inline]
fn deep_clone(&self, bump: &'bump Arena) -> Self {
// PERF: element-wise deep_clone — profile if hot.
let mut out = ArrayList::with_capacity_in(self.len(), bump);
for item in self.iter() {
out.push(item.deep_clone(bump));
}
out
}
}

impl<'bump, T: DeepClone<'bump>> DeepClone<'bump> for Vec<T> {
#[inline]
fn deep_clone(&self, bump: &'bump Arena) -> Self {
Expand Down Expand Up @@ -158,13 +146,6 @@ impl<'bump, T: DeepClone<'bump>> DeepClone<'bump> for Box<T> {
}
}

impl<'bump> DeepClone<'bump> for bun_ast::Loc {
#[inline]
fn deep_clone(&self, _bump: &'bump Arena) -> Self {
*self
}
}

// ───────────────────────────────────────────────────────────────────────────────
// Eql
// ───────────────────────────────────────────────────────────────────────────────
Expand All @@ -188,19 +169,6 @@ pub(crate) fn eql<T: CssEql>(lhs: &T, rhs: &T) -> bool {
lhs.eql(rhs)
}

fn eql_list<T: CssEql>(lhs: &ArrayList<'_, T>, rhs: &ArrayList<'_, T>) -> bool {
if lhs.len() != rhs.len() {
return false;
}
debug_assert_eq!(lhs.len(), rhs.len());
for (left, right) in lhs.iter().zip(rhs.iter()) {
if !left.eql(right) {
return false;
}
}
true
}

// Blanket / base impls.

impl<T: CssEql> CssEql for Option<T> {
Expand Down Expand Up @@ -235,13 +203,6 @@ impl<T: CssEql> CssEql for [T] {
}
}

impl<'bump, T: CssEql> CssEql for ArrayList<'bump, T> {
#[inline]
fn eql(&self, other: &Self) -> bool {
eql_list(self, other)
}
}

impl<T: CssEql> CssEql for Vec<T> {
#[inline]
fn eql(&self, other: &Self) -> bool {
Expand Down Expand Up @@ -320,13 +281,6 @@ impl CssEql for VendorPrefix {
}
}

impl CssEql for bun_ast::Loc {
#[inline]
fn eql(&self, other: &Self) -> bool {
self.start == other.start
}
}

impl CssEql for () {
#[inline]
fn eql(&self, _other: &Self) -> bool {
Expand Down Expand Up @@ -1481,12 +1435,6 @@ impl PartialCmp for f32 {
partial_cmp_f32(*self, *rhs)
}
}
impl PartialCmp for CSSInteger {
#[inline]
fn partial_cmp(&self, rhs: &Self) -> Option<Ordering> {
Some(Ord::cmp(self, rhs))
}
}

// ───────────────────────────────────────────────────────────────────────────────
// Zero / MulF32 / TryAdd — numeric protocol traits used by `DimensionPercentage<D>`
Expand Down
4 changes: 2 additions & 2 deletions src/dotenv/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pub mod no_proxy;
pub use error::{Error, Result};

pub use env_loader::{
DirEntryKeys, DirEntryProbe, DotEnvBehavior, DotEnvFileSuffix, HAS_NO_CLEAR_SCREEN_CLI_FLAG,
HashTable, HashTableValue, INSTANCE, Loader, Map, NullDelimitedEnvMap, S3Credentials, instance,
DirEntryKeys, DotEnvBehavior, DotEnvFileSuffix, HAS_NO_CLEAR_SCREEN_CLI_FLAG, HashTable,
HashTableValue, INSTANCE, Loader, Map, NullDelimitedEnvMap, S3Credentials, instance,
set_instance,
};

Expand Down
13 changes: 5 additions & 8 deletions src/ini/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,7 @@ bun_core::comptime_string_map! {
};
}

pub use draft::{
ConfigIterator, Parser, RegistryAuth, ScopeItem, ScopeIterator, ToStringFormatter,
apply_registry_auth, load_npmrc, load_npmrc_config,
};
pub use draft::{Parser, RegistryAuth, apply_registry_auth, load_npmrc, load_npmrc_config};

mod draft {

Expand Down Expand Up @@ -956,7 +953,7 @@ mod draft {
// ToStringFormatter
// ──────────────────────────────────────────────────────────────────────────

pub struct ToStringFormatter<'a> {
pub(crate) struct ToStringFormatter<'a> {
pub(crate) d: &'a ExprData,
}

Expand Down Expand Up @@ -1004,7 +1001,7 @@ mod draft {
// ConfigIterator
// ──────────────────────────────────────────────────────────────────────────

pub struct ConfigIterator<'a> {
pub(crate) struct ConfigIterator<'a> {
pub(crate) config: &'a E::Object,
pub(crate) log: &'a mut Log,

Expand Down Expand Up @@ -1176,7 +1173,7 @@ mod draft {
// ScopeIterator
// ──────────────────────────────────────────────────────────────────────────

pub struct ScopeIterator<'a> {
pub(crate) struct ScopeIterator<'a> {
pub(crate) config: &'a E::Object,
pub(crate) source: &'a Source,
pub(crate) log: &'a mut Log,
Expand All @@ -1185,7 +1182,7 @@ mod draft {
pub(crate) count: bool,
}

pub struct ScopeItem {
pub(crate) struct ScopeItem {
pub(crate) scope: Box<[u8]>,
pub(crate) registry: NpmRegistry,
}
Expand Down
2 changes: 1 addition & 1 deletion src/install/isolated_install/Store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ pub mod entry {
}

pub(crate) use entry::EntryColumns;
pub use entry::{Entry, StoreKeyFormatter, fmt_store_key};
pub use entry::{Entry, fmt_store_key};

// ──────────────────────────────────────────────────────────────────────────
// Node
Expand Down
3 changes: 1 addition & 2 deletions src/js_parser_jsc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ pub mod expr_jsc;
// callers can write `bun_js_parser_jsc::Expr` / `expr.to_js(global)` without
// also depending on `bun_js_parser` directly.
pub use expr_jsc::{
ExprJsc, data_to_js, expr_to_js, string_to_js, to_js_error, toml_datetime_to_js,
value_string_to_js,
ExprJsc, data_to_js, expr_to_js, string_to_js, to_js_error, value_string_to_js,
};
7 changes: 3 additions & 4 deletions src/paths/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,13 @@ pub mod path_buffer_pool;
// or out-param redesign. The `_buf`-suffixed fns (explicit `&mut [u8]` param)
// compile; the convenience wrappers don't yet. Gate the module; expose Platform.
pub mod resolve_path;
pub use resolve_path::{Platform, PlatformT, platform};
pub use resolve_path::{Platform, platform};
pub mod component_iterator;
pub use component_iterator::{
Component, ComponentIterator, MakePathStep, PathFormat, make_path_with,
};
pub mod classify;
pub use classify::{RelPathFacts, classify_rel_t};
pub use classify::classify_rel_t;
// Crate-root re-exports for the path-mutation helpers so `#[cfg(windows)]`
// install paths can call
// `bun_paths::dangerously_convert_path_to_posix_in_place(..)` directly.
Expand All @@ -347,7 +347,6 @@ pub use resolve_path::{
dirname_w, is_drive_letter, is_drive_letter_t, is_sep_any, is_sep_any_t, is_sep_native,
is_sep_native_t, join_abs_string_buf, join_abs_string_buf_z, path_to_posix_buf,
relative_to_common_path_buf, slashes_to_posix_in_place, slashes_to_windows_in_place,
windows_volume_name_len,
};
// Re-export the pool *type* at crate root so `bun_paths::os_path_buffer_pool::get()`
// resolves on both targets (= `WPathBuffer` pool on Windows, `PathBuffer` on
Expand Down Expand Up @@ -426,7 +425,7 @@ pub fn dirname(p: &[u8]) -> Option<&[u8]> {
}
#[path = "EnvPath.rs"]
pub mod env_path;
pub use env_path::{EnvPath, EnvPathInput, PathComponentBuilder};
pub use env_path::EnvPath;

// ──────────────────────────────────────────────────────────────────────────
// Windows path-prefix constants — relocated from
Expand Down
6 changes: 0 additions & 6 deletions src/semver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ impl Slicable for crate::semver_string::String {
crate::semver_string::String::slice(self, buf)
}
}
impl Slicable for crate::external_string::ExternalString {
#[inline]
fn slice<'a>(&'a self, buf: &'a [u8]) -> &'a [u8] {
crate::external_string::ExternalString::slice(self, buf)
}
}

/// Alias so callers can name `bun_semver::string::Formatter` etc.
pub use crate::semver_string as string;
Expand Down
2 changes: 1 addition & 1 deletion src/spawn_sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ libc.workspace = true
bun_analytics.workspace = true
bun_core.workspace = true
bun_sys.workspace = true
bun_windows_sys.workspace = true # tier-0 no_std leaf; unconditional like bun_sys/bun_core do — keeps the IoCounters alias valid on non-Windows so the flat re-export in lib.rs stays un-cfg'd
bun_windows_sys.workspace = true # tier-0 no_std leaf, unconditional like bun_sys/bun_core: the un-cfg'd IoCounters alias in spawn_process.rs must resolve on non-Windows
enumset.workspace = true
strum.workspace = true

Expand Down
4 changes: 2 additions & 2 deletions src/spawn_sys/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,6 @@ pub use spawn_process::spawn_process_posix;
#[cfg(windows)]
pub use spawn_process::uv_getrusage;
pub use spawn_process::{
Dup2, ExtraPipe, FdT, IoCounters, PidFdType, PidT, PosixSpawnOptions, PosixSpawnResult,
PosixStdio, Rusage, RusageFields, StdioKind, WinRusage, WinTimeval, rusage_zeroed,
Dup2, ExtraPipe, PidFdType, PidT, PosixSpawnOptions, PosixSpawnResult, PosixStdio, Rusage,
RusageFields, StdioKind, rusage_zeroed,
};
2 changes: 0 additions & 2 deletions src/spawn_sys/spawn_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ pub type PidT = bun_libuv_sys::uv_pid_t;

#[cfg(unix)]
pub type FdT = libc::c_int;
#[cfg(not(unix))]
pub type FdT = i32;

#[cfg(any(target_os = "linux", target_os = "android"))]
pub type PidFdType = FdT;
Expand Down
4 changes: 1 addition & 3 deletions src/tcc_sys/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
#![warn(unused_must_use)]
pub mod tcc;
pub use tcc::{
Config, ConfigErr, Error, ErrorFunc, OutputFormat, State, Symbol, TCCErrorFunc, TCCState,
};
pub use tcc::{Config, ConfigErr, Error, OutputFormat, State, Symbol};
2 changes: 1 addition & 1 deletion src/threading/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub use condition::{Condition, Condvar};
/// `Futex` re-exported as a capitalized module alias so callers can write
/// `Futex::wait`, `Futex::wake`, `Futex::Deadline`.
pub use futex as Futex;
pub use guarded::{Guarded, GuardedLock};
pub use guarded::Guarded;
pub use mutex::{Mutex, MutexGuard};
pub use reset_event::ResetEvent;
pub use rwlock::RwLock;
Expand Down
2 changes: 1 addition & 1 deletion src/uws_sys/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ pub use socket::{
pub use internal_loop_data::InternalLoopData;
#[cfg(windows)]
pub use loop_::WindowsLoop;
pub use loop_::{Loop, NOW_NS_UNKNOWN, PosixLoop};
pub use loop_::{Loop, NOW_NS_UNKNOWN};
pub use socket_kind::SocketKind;
#[cfg(windows)]
pub use timer::Timer;
Expand Down
6 changes: 3 additions & 3 deletions src/watcher/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub use error::{Error, Result};

pub use WatchItemKind as Kind;
pub use watcher_impl::{
AnyResolveWatcher, ChangedFilePath, Event, FdOwnership, HashType, MAX_COUNT,
MAX_EVICTION_COUNT, Op, PackageJSON, REQUIRES_FILE_DESCRIPTORS, WATCH_OPEN_FLAGS, WatchEvent,
WatchItem, WatchItemColumns, WatchItemIndex, WatchItemKind, WatchList, Watcher, WatcherContext,
AnyResolveWatcher, ChangedFilePath, Event, FdOwnership, HashType, MAX_COUNT, Op, PackageJSON,
REQUIRES_FILE_DESCRIPTORS, WATCH_OPEN_FLAGS, WatchEvent, WatchItemColumns, WatchItemKind,
WatchList, Watcher, WatcherContext,
};
Loading