-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Also remove the array copy - using `.asByteArrayUnsafe` instead of `.asByteArray` to return the original byte array without making a copy of it. FS2 doesn't mutate the byte array afaict, and this `readFileMultipart` method returns a `fs2.Stream[F, Byte]` - the caller isn't going to be able to mutate those Bytes. * Also removed the `Monad.ifM`. `ifM(pure(x))(t, f)` is the same as `if (x) t else false`. * Construct the `Chunk`s from byte arrays in a more direct fashion.
- Loading branch information
Leif Warner
committed
Nov 13, 2024
1 parent
110af16
commit 814bbea
Showing
1 changed file
with
13 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters