Skip to content

Commit 15412d6

Browse files
authored
Merge pull request #3139 from danicheg/scaladocs
Tweak some scaladocs
2 parents d733616 + 866ff5a commit 15412d6

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

core/shared/src/main/scala/fs2/Pull.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,8 @@ object Pull extends PullLowPriority {
786786
/** Steps through the stream, providing a `stepLeg`.
787787
* Yields to head in form of chunk, then id of the scope that was active after step evaluated and tail of the `stream`.
788788
*
789-
* @param stream Stream to step
790-
* @param scopeId scope has to be changed before this step is evaluated, id of the scope must be supplied
789+
* @param stream Stream to step
790+
* @param scope Scope has to be changed before this step is evaluated, id of the scope must be supplied
791791
*/
792792
private final case class StepLeg[+F[_], +O](stream: Pull[F, O, Unit], scope: Unique.Token)
793793
extends Action[Nothing, Nothing, Option[Stream.StepLeg[F, O]]]

core/shared/src/main/scala/fs2/Stream.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ import Pull.StreamPullOps
106106
* - `Stream.emit >=> f == f` (left identity)
107107
* - `f >=> Stream.emit === f` (right identity - note weaker equality notion here)
108108
* - `(f >=> g) >=> h == f >=> (g >=> h)` (associativity)
109-
* where `Stream.emit(a)` is defined as `chunk(Chunk.singleton(a)) and
109+
* where `Stream.emit(a)` is defined as `chunk(Chunk.singleton(a))` and
110110
* `f >=> g` is defined as `a => a flatMap f flatMap g`
111111
*
112112
* The monad is the list-style sequencing monad:
@@ -377,7 +377,7 @@ final class Stream[+F[_], +O] private[fs2] (private[fs2] val underlying: Pull[F,
377377
filterWithPrevious((o1, o2) => eq.neqv(f(o1), f(o2)))
378378

379379
/** Collects all output chunks in to a single chunk and emits it at the end of the
380-
* source stream. Note: if more than 2^32-1 elements are collected, this operation
380+
* source stream. Note: if more than 2^(32-1)^ elements are collected, this operation
381381
* will fail.
382382
*
383383
* @example {{{
@@ -3827,11 +3827,11 @@ object Stream extends StreamLowPriority {
38273827
override def apply[A](fa: Resource[F, A]): Stream[F, A] = resourceWeak[F, A](fa)
38283828
}
38293829

3830-
/** Converts the supplied [[java.lang.Autoclosable]] into a singleton stream. */
3830+
/** Converts the supplied [[java.lang.AutoCloseable]] into a singleton stream. */
38313831
def fromAutoCloseable[F[_]: Sync, O <: AutoCloseable](fo: F[O]): Stream[F, O] =
38323832
Stream.resource(Resource.fromAutoCloseable(fo))
38333833

3834-
/** Like [[fromAutoClosable]] but does not introduce a scope, allowing finalization to occur after
3834+
/** Like [[fromAutoCloseable]] but does not introduce a scope, allowing finalization to occur after
38353835
* subsequent appends or other scope-preserving transformations.
38363836
*
38373837
* Scopes can be manually introduced via [[Stream#scope]] if desired.
@@ -4035,9 +4035,9 @@ object Stream extends StreamLowPriority {
40354035
* or from the observer pipe (when applied to source chunks) will cause the
40364036
* termination of the resulting stream, and will be raised from this.
40374037
*
4038-
* @returns A stream that may emit the same outputs as this stream (source),
4039-
* in the same order and chunks, and performs the same effects as
4040-
* the source; but in which every chunk is processed by the pipe.
4038+
* @return A stream that may emit the same outputs as this stream (source),
4039+
* in the same order and chunks, and performs the same effects as
4040+
* the source; but in which every chunk is processed by the pipe.
40414041
*/
40424042
def observeAsync(
40434043
maxQueued: Int

core/shared/src/main/scala/fs2/internal/InterruptContext.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import InterruptContext.InterruptionOutcome
2929

3030
/** A context of interruption status. This is shared from the parent that was created as interruptible to all
3131
* its children. It assures consistent view of the interruption through the stack
32-
* @param concurrent Concurrent, used to create interruption at Eval.
32+
* @param deferred Deferred, used to create interruption at Eval.
3333
* If signalled with None, normal interruption is signalled. If signaled with Some(err) failure is signalled.
3434
* @param ref When None, scope is not interrupted,
3535
* when Some(None) scope was interrupted, and shall continue with `whenInterrupted`

core/shared/src/main/scala/fs2/internal/Scope.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ private[fs2] final class Scope[F[_]] private (
303303
go(self, Chain.empty)
304304
}
305305

306-
/** @returns true if the given `scopeId` identifies an ancestor of this scope, or false otherwise.
306+
/** @return true if the given `scopeId` identifies an ancestor of this scope, or false otherwise.
307307
*/
308308
def descendsFrom(scopeId: Unique.Token): Boolean = findSelfOrAncestor(scopeId).isDefined
309309

core/shared/src/main/scala/fs2/internal/ScopedResource.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import fs2.Compiler
5454
* scope is closed (or when the resource lease is no longer required) release the lease with `Lease#cancel`.
5555
*
5656
* Note that every method which may potentially call a resource finalizer returns `F[Either[Throwable, Unit]]`
57-
* instead of `F[Unit]`` to make sure any errors that occur when releasing the resource are properly handled.
57+
* instead of `F[Unit]` to make sure any errors that occur when releasing the resource are properly handled.
5858
*/
5959
private[fs2] sealed abstract class ScopedResource[F[_]] {
6060

io/jvm-native/src/main/scala/fs2/io/file/DeprecatedFilesApi.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private[file] trait DeprecatedFilesApi[F[_]] { self: Files[F] =>
134134
* readAttributes method and the file type tested with the BasicFileAttributes.isDirectory() method.
135135
*
136136
* @param path the path to the file to test
137-
* @param options - options indicating how symbolic links are handled
137+
* @param linkOption - options indicating how symbolic links are handled
138138
* @return true if the file is a directory; false if the file does not exist, is not a directory, or it cannot be determined if the file is a directory or not.
139139
*/
140140
@deprecated("Use overload which uses fs2.io.file.Path", "3.1.0")
@@ -158,7 +158,7 @@ private[file] trait DeprecatedFilesApi[F[_]] { self: Files[F] =>
158158
* method and the file type tested with the BasicFileAttributes.isRegularFile() method.
159159
*
160160
* @param path the path to the file
161-
* @param options options indicating how symbolic links are handled
161+
* @param linkOption options indicating how symbolic links are handled
162162
* @return true if the file is a regular file; false if the file does not exist, is not a regular file, or it cannot be determined if the file is a regular file or not.
163163
*/
164164
@deprecated("Use isRegularFile which uses fs2.io.file.Path", "3.1.0")

io/shared/src/test/scala/fs2/io/file/FilesExamples.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ object Examples {
8282
*
8383
* We have two options:
8484
* - call pathWithGreatestIn using the inverse of the feature, ensuring to "undo" the inverse on the
85-
* result. This requires a `Group` constraint on A`
85+
* result. This requires a `Group` constraint on `A`
8686
* - pass a different `Order` instance which reverses the order
8787
*
8888
* The second option is better for callers and is more general (it doesn't require a `Group[A]` instance).

0 commit comments

Comments
 (0)