     }
 
     @discardableResult func injectResult<Dependency: OutputProcedure>(from dependency: Dependency, block: @escaping (Self, Dependency.Output) -> Void) -> Self {
-
 
         func injectionResultGiven(_ pendingResult: Pending<ProcedureResult<Dependency.Output>>, and error: Error?) -> InjectionResult<Dependency> {
 

            case let .cancel(e):
                procedure.cancel(with: e)
            case let .success(output):
                block(self, output)
            }
        }
    }

        precondition(dependency !== self, "Cannot inject result of self into self.")

        dependency.addWillFinishBlockObserver(synchronizedWith: (self as? QueueProvider)) { [weak self] dependency, error, _ in
            guard let this = self else { return }
            block(this, dependency, error)
        }

        dependency.addDidCancelBlockObserver { [weak self] _, error in
            guard let this = self else { return }
            if let dependencyError = error {
                this.cancel(with: ProcedureKitError.dependency(cancelledWithError: dependencyError))
            }
            else {
                this.cancel(with: ProcedureKitError.dependenciesCancelled())
            }
        }

