From 7b9be1b0ba8460f554434529aac37270f18bcccf Mon Sep 17 00:00:00 2001
From: Vijay Nayar <vnayar@symmetryinvestments.com>
Date: Fri, 14 Jun 2024 12:54:08 +0200
Subject: [PATCH] Bugfix: Avoid implicitly converting from dstring to string,
 which appears to be no longer supported from dmd-2.104.0 onwards.

Fixes #102.
---
 source/fluentasserts/core/message.d |  6 +++---
 source/fluentasserts/core/results.d | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/source/fluentasserts/core/message.d b/source/fluentasserts/core/message.d
index d225eeb..07cf18c 100644
--- a/source/fluentasserts/core/message.d
+++ b/source/fluentasserts/core/message.d
@@ -181,15 +181,15 @@ void addDiff(ref EvaluationResult result, string actual, string expected) nothro
 
     foreach(diff; diffResult) {
       if(diff.operation == Operation.EQUAL) {
-        result.add(Message(Message.Type.info, diff.text));
+        result.add(Message(Message.Type.info, diff.text.to!string));
       }
 
       if(diff.operation == Operation.INSERT) {
-        result.add(Message(Message.Type.insert, diff.text));
+        result.add(Message(Message.Type.insert, diff.text.to!string));
       }
 
       if(diff.operation == Operation.DELETE) {
-        result.add(Message(Message.Type.delete_, diff.text));
+        result.add(Message(Message.Type.delete_, diff.text.to!string));
       }
     }
   } catch(Exception e) {
diff --git a/source/fluentasserts/core/results.d b/source/fluentasserts/core/results.d
index bf39fdb..d69cc1e 100644
--- a/source/fluentasserts/core/results.d
+++ b/source/fluentasserts/core/results.d
@@ -300,11 +300,11 @@ class DiffResult : IResult {
   private string getResult(const Diff d) {
     final switch(d.operation) {
         case Operation.DELETE:
-          return ResultGlyphs.diffBegin ~ ResultGlyphs.diffDelete ~ d.text ~ ResultGlyphs.diffEnd;
+          return ResultGlyphs.diffBegin ~ ResultGlyphs.diffDelete ~ d.text.to!string ~ ResultGlyphs.diffEnd;
         case Operation.INSERT:
-          return ResultGlyphs.diffBegin ~ ResultGlyphs.diffInsert ~ d.text ~ ResultGlyphs.diffEnd;
+          return ResultGlyphs.diffBegin ~ ResultGlyphs.diffInsert ~ d.text.to!string ~ ResultGlyphs.diffEnd;
         case Operation.EQUAL:
-          return d.text;
+          return d.text.to!string;
     }
   }
 
@@ -318,15 +318,15 @@ class DiffResult : IResult {
 
     foreach(diff; result) {
       if(diff.operation == Operation.EQUAL) {
-        printer.primary(diff.text);
+        printer.primary(diff.text.to!string);
       }
 
       if(diff.operation == Operation.INSERT) {
-        printer.successReverse(diff.text);
+        printer.successReverse(diff.text.to!string);
       }
 
       if(diff.operation == Operation.DELETE) {
-        printer.dangerReverse(diff.text);
+        printer.dangerReverse(diff.text.to!string);
       }
     }