Skip to content

Commit

Permalink
refactoring: Sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmomogwai committed Dec 22, 2023
1 parent b3eba73 commit ff6a3f9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ configuration "unittest" {
targetName "unittest"
targetPath "out/test"

dependency "unit-threaded" version="~>2.1.1"
dependency "unit-threaded" version="~>2.1.7"
mainSourceFile "source/testsuite.d"
postRunCommands "$DUB run lst2errormessages || true"
}
4 changes: 2 additions & 2 deletions dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"fileVersion": 1,
"versions": {
"color": "0.0.9",
"colored": "0.0.28",
"unit-threaded": "2.1.1"
"colored": "0.0.31+commit.1.g6316447",
"unit-threaded": "2.1.7"
}
}
16 changes: 6 additions & 10 deletions examples/basic/source/app.d
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
int main(string[] args)
{
import std.stdio;
import asciitable;
import colored;
import std.string;
import std.conv;

import asciitable;
import std.stdio;
import asciitable : AsciiTable, UnicodeParts;
import colored : blue, green, red, yellow;
import std.conv : to;
import std.stdio : writeln;
import std.string : format;

// dfmt off
new AsciiTable(2)
Expand All @@ -18,8 +15,7 @@ int main(string[] args)
.leftBorder(true)
.writeln;
// dfmt on



// dfmt off
new AsciiTable(2)
.row().add("helloworld".red.to!string ~ "\ntest").add("hello %s world".format("beautiful".red))
Expand Down
12 changes: 4 additions & 8 deletions source/asciitable/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ version(unittest)

@safe:

import std.string : split, join;
import colored : bold, leftJustifyFormattedString, unformattedLength;
import std.algorithm : map, max, maxElement;
import std.range : front;
import std.array : replicate;
import std.conv : to;
import colored : bold, unformattedLength, leftJustifyFormattedString;
import std.format : format;
import std.array : replicate;
import std.range : front;
import std.stdio : writeln;
import std.string : join, split;

class Cell
{
Expand All @@ -32,8 +32,6 @@ class Cell
ulong width;
this(AsciiTable table, Row row, string formatted)
{
import std.array;

this.table = table;
this.row = row;
this.lines = formatted.split("\n");
Expand Down Expand Up @@ -438,8 +436,6 @@ struct Formatter
///
@("example") unittest
{
import std.conv;

// dfmt off
auto table = new AsciiTable()
.header.add("HA", "HB")
Expand Down

0 comments on commit ff6a3f9

Please sign in to comment.