Skip to content

Commit

Permalink
Fixed all warnings which are fixable (#25)
Browse files Browse the repository at this point in the history
* Fixed all warnings which are fixable

* change modifier open to public
  • Loading branch information
AtulCel authored Nov 18, 2024
1 parent 19db447 commit f603151
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension Data {
return Data((withUnsafeBytes { byte -> [UInt8] in
var digest = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))

CC_MD5(byte.baseAddress, CC_LONG(count), &digest)
CC_SHA256(byte.baseAddress, CC_LONG(count), &digest)

return digest
})).base64EncodedString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class CommitPartUploadOperation: BaseOperation<HTTPURLResponse> {
class CommitPartUploadOperation: BaseOperation<HTTPURLResponse>, @unchecked Sendable {
// MARK: - Private Properties

private let descriptor: UploadDescriptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class CompleteUploadOperation: BaseOperation<JSONResponse> {
class CompleteUploadOperation: BaseOperation<JSONResponse>, @unchecked Sendable {
// MARK: - Private Properties

private let partsAndEtags: [Int: String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class StartUploadOperation: BaseOperation<UploadDescriptor> {
class StartUploadOperation: BaseOperation<UploadDescriptor>, @unchecked Sendable {
// MARK: - Private Properties

private let config: Config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class SubmitChunkUploadOperation: BaseOperation<HTTPURLResponse> {
class SubmitChunkUploadOperation: BaseOperation<HTTPURLResponse>, @unchecked Sendable {
// MARK: - Internal Properties

// Part offset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class SubmitPartIntelligentUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation {
class SubmitPartIntelligentUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation, @unchecked Sendable {
// MARK: - Internal Properties

let number: Int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class SubmitPartRegularUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation {
class SubmitPartRegularUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation, @unchecked Sendable {
// MARK: - Internal Properties

let number: Int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class SubmitPartsUploadOperation: BaseOperation<[Int: String]> {
class SubmitPartsUploadOperation: BaseOperation<[Int: String]>, @unchecked Sendable {
// MARK: - Internal Properties

let descriptor: UploadDescriptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class UploadOperation: BaseOperation<JSONResponse> {
class UploadOperation: BaseOperation<JSONResponse>, @unchecked Sendable {
// MARK: - Internal Properties

private(set) lazy var progress: Progress = {
Expand Down
4 changes: 2 additions & 2 deletions Sources/FilestackSDK/Public/Operations/BaseOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Foundation
/// - An executing operation will return `isExecuting` true.
/// - A finished operation will return `isFinished` true.
/// - A cancelled operation will return `isCancelled` true.
open class BaseOperation<Success>: Operation {
open class BaseOperation<Success>: Operation, @unchecked Sendable {
public typealias Result = Swift.Result<Success, Error>

// MARK: - Private Properties
Expand Down Expand Up @@ -81,7 +81,7 @@ open class BaseOperation<Success>: Operation {

extension BaseOperation {
/// Returns the result of operation.
open private(set) var result: Result {
public private(set) var result: Result {
get { lockQueue.sync { _result } }
set { lockQueue.sync { _result = newValue } }
}
Expand Down

0 comments on commit f603151

Please sign in to comment.