fix: accept suggestions

This commit is contained in:
fkunn1326
2025-03-06 18:37:29 +09:00
parent d0397c62ca
commit 6bb5d2d49f
2 changed files with 6 additions and 4 deletions

View File

@@ -107,8 +107,8 @@ extension LOUDS {
static func getDataForLoudstxt3(_ identifier: String, indices: [Int], cache: Data? = nil, option: ConvertRequestOptions) -> [DicdataElement] {
let binary: Data
if let cachedData = cache {
binary = cachedData
if let cache {
binary = cache
} else {
do {
let url = getLoudstxt3URL(identifier, option: option)
@@ -135,8 +135,8 @@ extension LOUDS {
static func getDataForLoudstxt3(_ identifier: String, indices: [(trueIndex: Int, keyIndex: Int)], cache: Data? = nil, option: ConvertRequestOptions) -> [(loudsNodeIndex: Int, dicdata: [DicdataElement])] {
let binary: Data
if let cachedData = cache {
binary = cachedData
if let cache {
binary = cache
} else {
do {
let url = getLoudstxt3URL(identifier, option: option)

View File

@@ -19,6 +19,7 @@ public extension ConvertRequestOptions {
sharedContainerURL: URL,
zenzaiMode: ZenzaiMode = .off,
textReplacer: TextReplacer = .withDefaultEmojiDictionary(),
preloadDictionary: Bool = false,
metadata: ConvertRequestOptions.Metadata?
) -> Self {
#if os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
@@ -46,6 +47,7 @@ public extension ConvertRequestOptions {
sharedContainerURL: sharedContainerURL,
textReplacer: textReplacer,
zenzaiMode: zenzaiMode,
preloadDictionary: preloadDictionary,
metadata: metadata
)
}