diff --git a/src/event_loop/ManagedTask.rs b/src/event_loop/ManagedTask.rs index 1c4bb5427a36..fd7462f56164 100644 --- a/src/event_loop/ManagedTask.rs +++ b/src/event_loop/ManagedTask.rs @@ -33,13 +33,6 @@ impl ManagedTask { callback(ctx.unwrap().as_ptr()) } - pub fn cancel(&mut self) { - fn noop(_: *mut c_void) -> JsResult<()> { - Ok(()) - } - self.callback = noop; - } - // A per-(Type, Callback) trampoline is folded away by storing // the type-erased fn pointer directly — `fn(*mut T)` and `fn(*mut c_void)` share ABI. pub fn new(ctx: *mut T, callback: fn(*mut T) -> JsResult<()>) -> Task { diff --git a/src/install/lib.rs b/src/install/lib.rs index e1ead257fe7a..2cec67b6c870 100644 --- a/src/install/lib.rs +++ b/src/install/lib.rs @@ -93,9 +93,7 @@ pub mod external_slice { }; } pub mod versioned_url { - pub use bun_install_types::resolver_hooks::{ - OldV2VersionedURL, VersionedURL, VersionedURLType, - }; + pub use bun_install_types::resolver_hooks::{VersionedURL, VersionedURLType}; } pub mod extract_tarball; diff --git a/src/install/lockfile/Package/Scripts.rs b/src/install/lockfile/Package/Scripts.rs index 4a40407b8750..a629ed57680b 100644 --- a/src/install/lockfile/Package/Scripts.rs +++ b/src/install/lockfile/Package/Scripts.rs @@ -402,7 +402,6 @@ impl Scripts { #[derive(Clone, Copy, PartialEq, Eq)] pub enum PrintFormat { Completed, - Info, Untrusted, } @@ -459,11 +458,6 @@ impl List { BStr::new(name), BStr::new(script), ), - PrintFormat::Info => bun_core::pretty!( - " [{s}]: {s}\n", - BStr::new(name), - BStr::new(script), - ), } } } diff --git a/src/install_types/lib.rs b/src/install_types/lib.rs index 3a95fae4ede0..7b6731bf0159 100644 --- a/src/install_types/lib.rs +++ b/src/install_types/lib.rs @@ -8,10 +8,10 @@ pub use resolver_hooks::{ DependencySlice, DependencyVersion, DependencyVersionTag, DependencyVersionValue, EnqueueResult, ExternalPackageNameHashList, ExternalSlice, ExternalStringList, ExternalStringMap, Features, INVALID_DEPENDENCY_ID, INVALID_PACKAGE_ID, Libc, Negatable, - NegatableEnum, NegatableExt, NpmInfo, OldV2VersionedURL, OperatingSystem, PackageID, - PackageJsonView, PackageNameHash, PreinstallState, Repository, Resolution, ResolutionSlice, - ResolutionTag, ResolutionValue, TagInfo, TarballInfo, TaskCallbackContext, - TruncatedPackageNameHash, URI, VersionSlice, VersionedURL, VersionedURLType, WakeHandler, + NegatableEnum, NegatableExt, NpmInfo, OperatingSystem, PackageID, PackageJsonView, + PackageNameHash, PreinstallState, Repository, Resolution, ResolutionSlice, ResolutionTag, + ResolutionValue, TagInfo, TarballInfo, TaskCallbackContext, TruncatedPackageNameHash, URI, + VersionSlice, VersionedURL, VersionedURLType, WakeHandler, }; // The canonical ExternalString / SlicedString / SemverString definitions live diff --git a/src/install_types/resolver_hooks.rs b/src/install_types/resolver_hooks.rs index 1e6c40e2b5d8..b3c4c59c5cfc 100644 --- a/src/install_types/resolver_hooks.rs +++ b/src/install_types/resolver_hooks.rs @@ -1052,7 +1052,6 @@ impl Repository { // can name the `npm` arm's payload without an upward edge. pub type VersionedURL = VersionedURLType; -pub type OldV2VersionedURL = VersionedURLType; #[repr(C)] pub struct VersionedURLType { diff --git a/src/resolver/fs.rs b/src/resolver/fs.rs index c5e1949710d0..5dec4abe7aca 100644 --- a/src/resolver/fs.rs +++ b/src/resolver/fs.rs @@ -278,38 +278,6 @@ impl Entry { } } -// `BSSList::append` requires `ValueType: Clone` (its overflow path -// retries with a copy). `Mutex`/`StringOrTinyString` aren't `Clone`, but for a -// freshly-constructed `Entry` (the only thing ever appended) a field-wise copy -// with a fresh `Mutex` is semantically equivalent to a by-value move. -impl Clone for Entry { - fn clone(&self) -> Self { - Self { - cache: core::cell::Cell::new(self.cache.get()), - dir: self.dir, - base_: strings::StringOrTinyString::init(self.base_.slice()), - base_lowercase_: strings::StringOrTinyString::init(self.base_lowercase_.slice()), - mutex: Mutex::default(), - need_stat: core::cell::Cell::new(self.need_stat.get()), - abs_path: self.abs_path, - } - } -} - -impl Default for Entry { - fn default() -> Self { - Self { - cache: core::cell::Cell::new(EntryCache::default()), - dir: b"", - base_: strings::StringOrTinyString::init(b""), - base_lowercase_: strings::StringOrTinyString::init(b""), - mutex: Mutex::default(), - need_stat: core::cell::Cell::new(true), - abs_path: Interned::EMPTY, - } - } -} - // `entry` is a RAW `*mut Entry`. A safe // `&self → &mut Entry` accessor would let two `get()` calls produce coexisting // aliased `&mut Entry` (PORTING.md §Forbidden). Callers `unsafe { &mut *entry }` diff --git a/src/resolver/lib.rs b/src/resolver/lib.rs index bd0f2d956935..edc0325bef15 100644 --- a/src/resolver/lib.rs +++ b/src/resolver/lib.rs @@ -2072,17 +2072,6 @@ pub mod cache { pub(crate) stream: bool, } - impl Default for Fs { - fn default() -> Self { - Self { - shared_buffer: MutableString::init(0).expect("unreachable"), - macro_shared_buffer: MutableString::init(0).expect("unreachable"), - use_alternate_source_cache: false, - stream: false, - } - } - } - /// Optional external destructor (`function(ctx)`) for foreign-owned /// source bytes; `NONE` when there is nothing external to free. #[repr(C)] diff --git a/src/resolver/result.rs b/src/resolver/result.rs index 15a41b1a949d..3518ee18eed0 100644 --- a/src/resolver/result.rs +++ b/src/resolver/result.rs @@ -292,21 +292,6 @@ pub struct DirEntryResolveQueueItem { pub(crate) fd: FD, } -impl Default for DirEntryResolveQueueItem { - fn default() -> Self { - Self { - result: allocators::Result { - hash: 0, - index: allocators::NOT_FOUND, - status: allocators::ItemStatus::Unknown, - }, - unsafe_path: bun_ptr::RawSlice::EMPTY, - safe_path: bun_ptr::RawSlice::EMPTY, - fd: FD::INVALID, - } - } -} - // `bun_alloc::Result` doesn't derive Clone (yet); all its fields are Copy, so // hand-roll Clone here for the queue-item move at `dir_info_cached`. impl Clone for DirEntryResolveQueueItem { diff --git a/src/runtime/node/node_fs.rs b/src/runtime/node/node_fs.rs index 87705617cc01..d29acb23a245 100644 --- a/src/runtime/node/node_fs.rs +++ b/src/runtime/node/node_fs.rs @@ -4550,12 +4550,6 @@ pub enum StatOrNotFound { NotFound, } impl StatOrNotFound { - pub fn to_js(&mut self, global_object: &JSGlobalObject) -> JsResult { - match self { - StatOrNotFound::Stats(s) => s.to_js_newly_created(global_object), - StatOrNotFound::NotFound => Ok(JSValue::UNDEFINED), - } - } pub(crate) fn to_js_newly_created(&self, global_object: &JSGlobalObject) -> JsResult { match self { StatOrNotFound::Stats(s) => s.to_js_newly_created(global_object), diff --git a/src/runtime/webcore/fetch.rs b/src/runtime/webcore/fetch.rs index 0ba498364782..82d13815de41 100644 --- a/src/runtime/webcore/fetch.rs +++ b/src/runtime/webcore/fetch.rs @@ -36,7 +36,7 @@ pub mod fetch_tasklet; #[path = "fetch/FetchRequestBodySink.rs"] pub mod fetch_request_body_sink; -pub use self::fetch_request_body_sink::{FetchRequestBodySink, FetchRequestBodySinkJSSink}; +pub use self::fetch_request_body_sink::FetchRequestBodySink; #[path = "fetch/compress_body.rs"] pub mod compress_body; diff --git a/src/runtime/webcore/fetch/FetchRequestBodySink.rs b/src/runtime/webcore/fetch/FetchRequestBodySink.rs index ddb136440be1..75c3230483b0 100644 --- a/src/runtime/webcore/fetch/FetchRequestBodySink.rs +++ b/src/runtime/webcore/fetch/FetchRequestBodySink.rs @@ -5,7 +5,6 @@ use bun_sys::Error as SysError; use crate::webcore::blob::SizeType as BlobSizeType; use crate::webcore::fetch::fetch_tasklet::FetchTasklet; use crate::webcore::jsc::{JSGlobalObject, JSPromise, JSValue}; -use crate::webcore::sink::JSSink; use crate::webcore::streams::{ SourceHandle, Start, StartTag, StreamError, StreamResult, Writable, WritablePending, }; @@ -315,5 +314,3 @@ impl crate::webcore::sink::JsSinkType for FetchRequestBodySink { self.done } } - -pub type FetchRequestBodySinkJSSink = JSSink;