Skip to content

fixed Event renamed api, some compile warnings cleanup #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Stream/Readable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public extension Readable {
self.context.execute {
if newValue && self._rimpl._flow == nil {
self._rimpl._flow = self.on(.readable).react {
self.read()
let _ = self.read()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we should silence this things, leave a TODO at least so we could get to cleanup later

}
} else if !newValue && self._rimpl._flow != nil {
self._rimpl._flow?()
Expand Down Expand Up @@ -239,7 +239,7 @@ public extension Readable where InChunk : Creatable & BufferProtocol {
let readableOff = self.on(.readable).react {
//if we are not paused this one whould be called automatically
if self.paused {
self.read()
let _ = self.read()
}
}

Expand Down Expand Up @@ -318,15 +318,15 @@ public class RawReadableSpiTest : RawReadableSpi {
}

if self.data?.isEmpty ?? false {
self._push(nil)
let _ = self._push(nil)
self.data = nil
}
}
}
}

func f() {
let aa = RawReadableSpi()
let _ = RawReadableSpi()
}

/*public class RawReadableTest: RawReadable {
Expand Down
2 changes: 1 addition & 1 deletion Stream/ReadableEvents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public struct ReadableEventGroup<E : Event, Payload> {
}

public extension ReadableEventEmitterProtocol {
public func on<E : Event>(_ groupedEvent: ReadableEventGroup<E, InChunk>) -> EventConveyor<E.Payload> {
public func on<E : Event>(_ groupedEvent: ReadableEventGroup<E, InChunk>) -> SignalStream<E.Payload> {
return self.on(groupedEvent.event)
}

Expand Down
2 changes: 1 addition & 1 deletion Stream/Stream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public protocol StreamEventEmitterProtocol : EventEmitter {
}

public extension StreamEventEmitterProtocol {
func on<E : Event>(_ groupedEvent: StreamEventGroup<E>) -> EventConveyor<E.Payload> {
func on<E : Event>(_ groupedEvent: StreamEventGroup<E>) -> SignalStream<E.Payload> {
return self.on(groupedEvent.event)
}

Expand Down
4 changes: 2 additions & 2 deletions Stream/Writable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public class WritableImpl<Spi: WritableSpiProtocol> : WritableEventEmitterProtoc

let dataOff = r.on(.data).settle(in: self.context).react { chunk in
//maybe we should handle the future result??
self._write(data: chunk)
let _ = self._write(data: chunk)
}

let errorOff = r.on(.error).settle(in: self.context).react { e in
Expand All @@ -139,7 +139,7 @@ public class WritableImpl<Spi: WritableSpiProtocol> : WritableEventEmitterProtoc
}

let endOff:SafeTask? = !end ? nil : r.on(.end).settle(in: self.context).react {
self._end()
let _ = self._end()
}

self._pipe = PipeConnection(readable: r, dataOff: dataOff, errorOff:errorOff, endOff:endOff)
Expand Down
2 changes: 1 addition & 1 deletion Stream/WritableEvents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public struct WritableEventGroup<E : Event> {
}

public extension WritableEventEmitterProtocol {
public func on<E : Event>(_ groupedEvent: WritableEventGroup<E>) -> EventConveyor<E.Payload> {
public func on<E : Event>(_ groupedEvent: WritableEventGroup<E>) -> SignalStream<E.Payload> {
return self.on(groupedEvent.event)
}

Expand Down