<commit_before>import Foundation
import Swish
import Result

struct FakeRequest: Request {
  typealias ResponseObject = String

  func build() -> URLRequest {
    return URLRequest(url: URL(string: "http://example.com")!)
  }

  func parse(_ data: Data) throws -> String {
    let body = try JSONDecoder().decode(FakeResponseBody.self, from: data)
    return body.text
  }
}

private struct FakeResponseBody: Codable {
  var text: String
}

struct FakeEmptyDataRequest: Request {
  typealias ResponseObject = EmptyResponse

  func build() -> URLRequest {
    return URLRequest(url: URL(string: "http://example.com")!)
  }
}

struct FakeStringRequest: Request {<commit_msg>Use an inline struct instead of fileprivate<commit_after>import Foundation
import Swish
import Result

struct FakeRequest: Request {
  typealias ResponseObject = String

  func build() -> URLRequest {
    return URLRequest(url: URL(string: "http://example.com")!)
  }

  func parse(_ data: Data) throws -> String {
    struct Body: Codable { var text: String }
    let body = try JSONDecoder().decode(Body.self, from: data)
    return body.text
  }
}

struct FakeEmptyDataRequest: Request {
  typealias ResponseObject = EmptyResponse

  func build() -> URLRequest {
    return URLRequest(url: URL(string: "http://example.com")!)
  }
}

struct FakeStringRequest: Request {
{'fraction_non_alphanumeric': 0.10722263588979895, 'fraction_numerical': 0.0, 'mean_word_length': 4.149425287356322, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5297969', 'n_tokens_mistral': 399, 'n_tokens_neox': 388, 'n_words': 117}