Skip to content

Commit 1388516

Browse files
committed
Format and lint
1 parent 1b38ca8 commit 1388516

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+280
-280
lines changed

Sources/MongoSwift/APM.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private protocol InitializableFromOpaquePointer {
3434
/// in the `userInfo` property of `Notification`s posted under the name .commandStarted.
3535
public struct CommandStartedEvent: MongoCommandEvent, InitializableFromOpaquePointer {
3636
/// The name this event will be posted under.
37-
public static var eventName: Notification.Name { return .commandStarted }
37+
public static var eventName: Notification.Name { .commandStarted }
3838

3939
/// The command.
4040
public let command: Document
@@ -71,7 +71,7 @@ public struct CommandStartedEvent: MongoCommandEvent, InitializableFromOpaquePoi
7171
/// in the `userInfo` property of `Notification`s posted under the name .commandSucceeded.
7272
public struct CommandSucceededEvent: MongoCommandEvent, InitializableFromOpaquePointer {
7373
/// The name this event will be posted under.
74-
public static var eventName: Notification.Name { return .commandSucceeded }
74+
public static var eventName: Notification.Name { .commandSucceeded }
7575

7676
/// The execution time of the event, in microseconds.
7777
public let duration: Int64
@@ -108,7 +108,7 @@ public struct CommandSucceededEvent: MongoCommandEvent, InitializableFromOpaqueP
108108
/// in the `userInfo` property of `Notification`s posted under the name .commandFailed.
109109
public struct CommandFailedEvent: MongoCommandEvent, InitializableFromOpaquePointer {
110110
/// The name this event will be posted under.
111-
public static var eventName: Notification.Name { return .commandFailed }
111+
public static var eventName: Notification.Name { .commandFailed }
112112

113113
/// The execution time of the event, in microseconds.
114114
public let duration: Int64
@@ -146,7 +146,7 @@ public struct CommandFailedEvent: MongoCommandEvent, InitializableFromOpaquePoin
146146
/// Published when a server description changes. This does NOT include changes to the server's roundTripTime property.
147147
public struct ServerDescriptionChangedEvent: MongoEvent, InitializableFromOpaquePointer {
148148
/// The name this event will be posted under.
149-
public static var eventName: Notification.Name { return .serverDescriptionChanged }
149+
public static var eventName: Notification.Name { .serverDescriptionChanged }
150150

151151
/// The connection ID (host/port pair) of the server.
152152
public let connectionId: ConnectionId
@@ -176,7 +176,7 @@ public struct ServerDescriptionChangedEvent: MongoEvent, InitializableFromOpaque
176176
/// Published when a server is initialized.
177177
public struct ServerOpeningEvent: MongoEvent, InitializableFromOpaquePointer {
178178
/// The name this event will be posted under.
179-
public static var eventName: Notification.Name { return .serverOpening }
179+
public static var eventName: Notification.Name { .serverOpening }
180180

181181
/// The connection ID (host/port pair) of the server.
182182
public let connectionId: ConnectionId
@@ -198,7 +198,7 @@ public struct ServerOpeningEvent: MongoEvent, InitializableFromOpaquePointer {
198198
/// Published when a server is closed.
199199
public struct ServerClosedEvent: MongoEvent, InitializableFromOpaquePointer {
200200
/// The name this event will be posted under.
201-
public static var eventName: Notification.Name { return .serverClosed }
201+
public static var eventName: Notification.Name { .serverClosed }
202202

203203
/// The connection ID (host/port pair) of the server.
204204
public let connectionId: ConnectionId
@@ -220,7 +220,7 @@ public struct ServerClosedEvent: MongoEvent, InitializableFromOpaquePointer {
220220
/// Published when a topology description changes.
221221
public struct TopologyDescriptionChangedEvent: MongoEvent, InitializableFromOpaquePointer {
222222
/// The name this event will be posted under.
223-
public static var eventName: Notification.Name { return .topologyDescriptionChanged }
223+
public static var eventName: Notification.Name { .topologyDescriptionChanged }
224224

225225
/// A unique identifier for the topology.
226226
public let topologyId: ObjectId
@@ -246,7 +246,7 @@ public struct TopologyDescriptionChangedEvent: MongoEvent, InitializableFromOpaq
246246
/// Published when a topology is initialized.
247247
public struct TopologyOpeningEvent: MongoEvent, InitializableFromOpaquePointer {
248248
/// The name this event will be posted under.
249-
public static var eventName: Notification.Name { return .topologyOpening }
249+
public static var eventName: Notification.Name { .topologyOpening }
250250

251251
/// A unique identifier for the topology.
252252
public let topologyId: ObjectId
@@ -264,7 +264,7 @@ public struct TopologyOpeningEvent: MongoEvent, InitializableFromOpaquePointer {
264264
/// Published when a topology is closed.
265265
public struct TopologyClosedEvent: MongoEvent, InitializableFromOpaquePointer {
266266
/// The name this event will be posted under.
267-
public static var eventName: Notification.Name { return .topologyClosed }
267+
public static var eventName: Notification.Name { .topologyClosed }
268268

269269
/// A unique identifier for the topology.
270270
public let topologyId: ObjectId
@@ -283,7 +283,7 @@ public struct TopologyClosedEvent: MongoEvent, InitializableFromOpaquePointer {
283283
/// the ismaster command is serialized into raw BSON and written to the socket.
284284
public struct ServerHeartbeatStartedEvent: MongoEvent, InitializableFromOpaquePointer {
285285
/// The name this event will be posted under.
286-
public static var eventName: Notification.Name { return .serverHeartbeatStarted }
286+
public static var eventName: Notification.Name { .serverHeartbeatStarted }
287287

288288
/// The connection ID (host/port pair) of the server.
289289
public let connectionId: ConnectionId
@@ -297,7 +297,7 @@ public struct ServerHeartbeatStartedEvent: MongoEvent, InitializableFromOpaquePo
297297
/// Published when the server monitor’s ismaster succeeds.
298298
public struct ServerHeartbeatSucceededEvent: MongoEvent, InitializableFromOpaquePointer {
299299
/// The name this event will be posted under.
300-
public static var eventName: Notification.Name { return .serverHeartbeatSucceeded }
300+
public static var eventName: Notification.Name { .serverHeartbeatSucceeded }
301301

302302
/// The execution time of the event, in microseconds.
303303
public let duration: Int64
@@ -320,7 +320,7 @@ public struct ServerHeartbeatSucceededEvent: MongoEvent, InitializableFromOpaque
320320
/// Published when the server monitor’s ismaster fails, either with an “ok: 0” or a socket exception.
321321
public struct ServerHeartbeatFailedEvent: MongoEvent, InitializableFromOpaquePointer {
322322
/// The name this event will be posted under.
323-
public static var eventName: Notification.Name { return .serverHeartbeatFailed }
323+
public static var eventName: Notification.Name { .serverHeartbeatFailed }
324324

325325
/// The execution time of the event, in microseconds.
326326
public let duration: Int64

Sources/MongoSwift/BSON/BSON.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public enum BSON {
8383

8484
/// Get the `BSONType` of this `BSON`.
8585
public var type: BSONType {
86-
return self.bsonValue.bsonType
86+
self.bsonValue.bsonType
8787
}
8888

8989
/// If this `BSON` is an `.int32`, return it as an `Int32`. Otherwise, return nil.

0 commit comments

Comments
 (0)