Skip to content

Commit c21bbe4

Browse files
committed
ktlint
1 parent 8a5669a commit c21bbe4

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/WithCrt.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ package aws.sdk.kotlin.crt
77
/**
88
* A mixin class used to ensure CRT is initialized before the class is invoked
99
*/
10-
public open class WithCrt() {
10+
public open class WithCrt {
1111
init {
12-
CRT.initRuntime { }
12+
CRT.initRuntime { }
1313
}
14-
}
14+
}

aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/util/hashing/CrcNative.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ internal class Crc(val checksumFn: AwsChecksumsCrcFunction) : HashFunction {
4949
/**
5050
* A CRC32 [HashFunction] implemented using bindings to CRT.
5151
*/
52-
public class Crc32 : HashFunction, WithCrt() {
52+
public class Crc32 :
53+
WithCrt(),
54+
HashFunction {
5355
private val crc32 = Crc(::aws_checksums_crc32)
5456
override fun update(input: ByteArray, offset: Int, length: Int) {
5557
crc32.update(input, offset, length)
@@ -63,7 +65,9 @@ public class Crc32 : HashFunction, WithCrt() {
6365
/**
6466
* A CRC32C [HashFunction] implemented using bindings to CRT.
6567
*/
66-
public class Crc32c : HashFunction, WithCrt() {
68+
public class Crc32c :
69+
WithCrt(),
70+
HashFunction {
6771
private val crc32c = Crc(::aws_checksums_crc32c)
6872
override fun update(input: ByteArray, offset: Int, length: Int) {
6973
crc32c.update(input, offset, length)

aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/util/hashing/Md5Native.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package aws.sdk.kotlin.crt.util.hashing
66

77
import aws.sdk.kotlin.crt.Allocator
8-
import aws.sdk.kotlin.crt.CRT
98
import aws.sdk.kotlin.crt.WithCrt
109
import aws.sdk.kotlin.crt.awsAssertOpSuccess
1110
import kotlinx.cinterop.addressOf
@@ -24,7 +23,9 @@ import libcrt.aws_md5_new
2423
/**
2524
* MD5 hash function implemented using bindings to CRT
2625
*/
27-
public class Md5 : HashFunction, WithCrt() {
26+
public class Md5 :
27+
WithCrt(),
28+
HashFunction {
2829
private var md5 = checkNotNull(aws_md5_new(Allocator.Default)) { "aws_md5_new" }
2930

3031
override fun update(input: ByteArray, offset: Int, length: Int) {

aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/util/hashing/ShaNative.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package aws.sdk.kotlin.crt.util.hashing
66

77
import aws.sdk.kotlin.crt.Allocator
8-
import aws.sdk.kotlin.crt.CRT
98
import aws.sdk.kotlin.crt.WithCrt
109
import aws.sdk.kotlin.crt.awsAssertOpSuccess
1110
import kotlinx.cinterop.*
@@ -21,7 +20,9 @@ internal typealias InitializeHashFn = (
2120
/**
2221
* SHA-1 hash function implemented using bindings to CRT
2322
*/
24-
public class Sha1 : HashFunction, WithCrt() {
23+
public class Sha1 :
24+
WithCrt(),
25+
HashFunction {
2526
private val sha1 = Sha(::aws_sha1_new)
2627
override fun update(input: ByteArray, offset: Int, length: Int) {
2728
sha1.update(input, offset, length)
@@ -35,7 +36,9 @@ public class Sha1 : HashFunction, WithCrt() {
3536
/**
3637
* SHA-256 hash function implemented using bindings to CRT
3738
*/
38-
public class Sha256 : HashFunction, WithCrt() {
39+
public class Sha256 :
40+
WithCrt(),
41+
HashFunction {
3942
private val sha256 = Sha(::aws_sha256_new)
4043
override fun update(input: ByteArray, offset: Int, length: Int) {
4144
sha256.update(input, offset, length)

0 commit comments

Comments
 (0)