10000 Require Inko 0.13.2 or newer · yorickpeterse/clogs@e29a178 · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
Require Inko 0.13.2 or newer
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickpeterse committed Dec 14, 2023
1 parent fd32422 commit e29a178
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 51 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ changelog.

## Requirements

- Inko 0.13.1 or newer
- Inko 0.13.2 or newer
- Git

Generating changelogs comes with the following workflow requirements:
Expand Down
2 changes: 1 addition & 1 deletion inko.pkg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require https://github.com/yorickpeterse/inko-optparse 0.2.0 580f7344f7a6227fe48c330b69dc708ac96f7e83
require https://github.com/yorickpeterse/inko-optparse 0.3.0 ce2d3df0ffc4be53a83e2ca8e4e1a190f57e837e
48 changes: 0 additions & 48 deletions src/clogs/patches.inko
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
import std.cmp.Equal
import std.iter.Stream

impl Array if T: Equal[T] {
fn pub index_of(value: ref T) -> Option[Int] {
let mut idx = 0

while idx < @size {
if get(idx) == value { return Option.Some(idx) }
idx += 1
}

Option.None
}
}

impl String {
fn pub replace(string: String, with: String) -> String {
let idx = match byte_index(string, starting_at: 0) {
Expand All @@ -28,35 +12,3 @@ impl String {
new.into_string
}
}

impl Bool {
fn pub then[T](func: fn -> T) -> Option[T] {
if self { Option.Some(func.call) } else { Option.None }
}
}

# https://github.com/inko-lang/inko/issues/638
impl Stream {
fn pub mut try_each[E](func: fn (T) -> Result[Nil, E]) -> Result[Nil, E] {
loop {
match self.next {
case Some(v) -> try func.call(v)
case _ -> return Result.Ok(nil)
}
}
}

fn pub mut try_reduce[A, E](
accumulator: A,
func: fn (A, T) -> Result[A, E],
) -> Result[A, E] {
let mut result = accumulator

loop {
match self.next {
case Some(v) -> result = try func.call(result, v)
case _ -> return Result.Ok(result)
}
}
}
}
2 changes: 1 addition & 1 deletion src/clogs/version.inko
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl ToString for Version {
}
}

impl Equal[Version] for Version {
impl Equal[ref Version] for Version {
fn pub ==(other: ref Version) -> Bool {
@major == other.major and @minor == other.minor and @patch == other.patch
}
Expand Down

0 comments on commit e29a178

Please sign in to comment.
0