Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
bgw committed Jan 17, 2025
1 parent 4300139 commit f1bf66f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions turbopack/crates/turbopack-dev-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ impl<T> NonLocalSourceProvider<T> {
/// In the future, `auto_traits` may be be able to implement `NonLocalValue` for us, and avoid
/// this wrapper type and unsafe constructor.
///
/// Safety: `source_provider` must be a type that could safely implement `NonLocalValue`. If
/// it's a closure, the closure must not capture any values that are not a `NonLocalValue`.
/// # Safety
///
/// `source_provider` must be a type that could safely implement `NonLocalValue`. If it's a
/// closure, the closure must not capture any values that are not a `NonLocalValue`.
pub unsafe fn new(source_provider: T) -> Self {
Self(source_provider)
}
Expand Down
8 changes: 6 additions & 2 deletions turbopack/crates/turbopack-dev-server/src/update/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ pub struct GetContentFn(Box<dyn Fn() -> OperationVc<ResolveSourceRequestResult>
impl GetContentFn {
/// Wrap a function in `GetContentFn`.
///
/// Safety: The closure must not include any types that aren't `NonLocalValue`, or that couldn't
/// # Safety
///
/// The closure must not include any types that aren't `NonLocalValue`, or that couldn't
/// otherwise safely implement `NonLocalValue`.
///
/// In the future, `auto_traits` may be be able to implement `NonLocalValue` for us, and avoid
Expand All @@ -47,7 +49,9 @@ impl GetContentFn {
/// Wrap a boxed function in `GetContentFn`. This specialized version of [`GetContentFn::new`]
/// avoids double-boxing if you already have a boxed function.
///
/// Safety: Same as [`GetContentFn::new`].
/// # Safety
///
/// Same as [`GetContentFn::new`].
pub unsafe fn new_boxed(
func: Box<dyn Fn() -> OperationVc<ResolveSourceRequestResult> + Send + Sync>,
) -> Self {
Expand Down

0 comments on commit f1bf66f

Please sign in to comment.