Skip to content

Commit

Permalink
crystal tool format with 1.8-dev (#575)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Jan 23, 2023
1 parent a3a0ad4 commit aa5fa55
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion spec/support/cli.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Spec.before_each do
end
end

def with_shard(metadata, lock = nil, override = nil)
def with_shard(metadata, lock = nil, override = nil, &)
Dir.cd(application_path) do
File.write "shard.yml", to_shard_yaml(metadata)
File.write "shard.lock", to_lock_yaml(lock) if lock
Expand Down
2 changes: 1 addition & 1 deletion src/commands/command.cr
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module Shards
Shards::Lock.write(packages, override_path, LOCK_FILENAME)
end

def handle_resolver_errors
def handle_resolver_errors(&)
yield
rescue e : Molinillo::ResolverError
Log.error { e.message }
Expand Down
4 changes: 2 additions & 2 deletions src/ext/yaml.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module YAML
class PullParser
# Iterates a sequence, yielding on each new entry until the sequence is
# terminated.
def each_in_sequence : Nil
def each_in_sequence(&) : Nil
read_sequence_start
until kind == YAML::EventKind::SEQUENCE_END
yield
Expand All @@ -14,7 +14,7 @@ module YAML

# Iterates a mapping, yielding on each new entry until the mapping is
# terminated.
def each_in_mapping : Nil
def each_in_mapping(&) : Nil
read_mapping_start
until kind == YAML::EventKind::MAPPING_END
yield
Expand Down
2 changes: 1 addition & 1 deletion src/resolvers/fossil.cr
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ module Shards
end
end

private def fossil_retry(err = "Failed to fetch repository")
private def fossil_retry(err = "Failed to fetch repository", &)
retries = 0
loop do
yield
Expand Down
2 changes: 1 addition & 1 deletion src/resolvers/git.cr
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ module Shards
end
end

private def git_retry(err = "Failed to fetch repository")
private def git_retry(err = "Failed to fetch repository", &)
retries = 0
loop do
yield
Expand Down
2 changes: 1 addition & 1 deletion src/resolvers/hg.cr
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ module Shards
end
end

private def hg_retry(err = "Failed to update repository")
private def hg_retry(err = "Failed to update repository", &)
retries = 0
loop do
return yield
Expand Down
2 changes: 1 addition & 1 deletion src/versions.cr
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module Shards
end
end

def only_zeroes?
def only_zeroes?(&)
return if empty?
yield unless to_i? == 0

Expand Down

0 comments on commit aa5fa55

Please sign in to comment.