Skip to content

Commit

Permalink
Merge pull request ml-archive#43 from tonyarnold/6.0.0-beta.2
Browse files Browse the repository at this point in the history
Update package to work with Leaf 4.0.0
  • Loading branch information
siemensikkema authored Sep 2, 2021
2 parents f05caa1 + 82efc06 commit 4e3e7c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let package = Package(
.library(name: "Flash", targets: ["Flash"]),
],
dependencies: [
.package(url: "https://github.com/vapor/leaf.git", from: "4.0.0-rc"),
.package(url: "https://github.com/vapor/leaf.git", from: "4.0.0"),
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"),
],
targets: [
Expand Down
4 changes: 2 additions & 2 deletions Sources/Flash/Tags/FlashTag.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Leaf
import LeafKit
import Vapor

public struct FlashTag: LeafTag {
Expand Down Expand Up @@ -26,7 +27,6 @@ public struct FlashTag: LeafTag {
}

extension Collection where Element: LeafDataRepresentable {
/// Note that this is _not_ conformance to `LeafDataRepresentable`, as the return type here is non-optional. It will always produce a result.
var leafData: LeafData {
.array(compactMap { $0.leafData })
}
Expand All @@ -39,7 +39,7 @@ extension Flash: LeafDataRepresentable {
static let message = "message"
}

public var leafData: LeafData? {
public var leafData: LeafData {
.dictionary([
DataKey.kind: .string(kind.rawValue),
DataKey.bootstrapClass: .string(kind.bootstrapClass),
Expand Down

0 comments on commit 4e3e7c6

Please sign in to comment.