Skip to content

Commit

Permalink
gpui: Move generic bounds to a where clause for better readability (#…
Browse files Browse the repository at this point in the history
…23985)

This PR moves some generic bounds to a `where` clause to improve the
formatting/readability of the associated `impl` block.

Release Notes:

- N/A
  • Loading branch information
maxdeviant authored Jan 30, 2025
1 parent 2c950cf commit 7bf4fd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/gpui/src/elements/img.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ impl From<Arc<Image>> for ImageSource {
}
}

impl<
F: Fn(&mut Window, &mut App) -> Option<Result<Arc<RenderImage>, ImageCacheError>> + 'static,
> From<F> for ImageSource
impl<F> From<F> for ImageSource
where
F: Fn(&mut Window, &mut App) -> Option<Result<Arc<RenderImage>, ImageCacheError>> + 'static,
{
fn from(value: F) -> Self {
Self::Custom(Arc::new(value))
Expand Down

0 comments on commit 7bf4fd6

Please sign in to comment.