From f02371a63a70e605e407f70e4008331c5d1aeeb1 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Mon, 10 Jul 2017 03:14:18 +0200 Subject: [PATCH] Fix deprecations - `Erase` is part of std.meta for a long time - catch statement without an exception specification is deprecated `catch(Throwable)` can be used to retain the old behavior --- source/ggplotd/colour.d | 2 +- source/ggplotd/stat.d | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/ggplotd/colour.d b/source/ggplotd/colour.d index f11dd02..9f8fc7d 100644 --- a/source/ggplotd/colour.d +++ b/source/ggplotd/colour.d @@ -27,7 +27,7 @@ auto namedColour(in string name) try { colour = colorFromString(name).toColourSpace!RGB; - } catch {} + } catch (Throwable) {} return colour; } diff --git a/source/ggplotd/stat.d b/source/ggplotd/stat.d index e3ef07c..3e3a571 100644 --- a/source/ggplotd/stat.d +++ b/source/ggplotd/stat.d @@ -508,7 +508,8 @@ auto statDensity2D(AES)( AES aesRange ) import std.array : array; import std.conv : to; import std.range : chain, front, iota, zip; - import std.typecons : Erase, tuple, Tuple; + import std.meta : Erase; + import std.typecons : tuple, Tuple; import ggplotd.aes : Aes, group, DefaultGroupFields; import ggplotd.algorithm : safeMin, safeMax; import ggplotd.range : mergeRange;