From e9e17be24eba558c30fcdc41ea5bb9a1da7fd4e7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 12 Mar 2024 22:39:09 -0400 Subject: mark modules as @safe: (& identify what is not) --- src/doc_reform/spine.d | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/doc_reform/spine.d') diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d index fc9d903..ef1a484 100755 --- a/src/doc_reform/spine.d +++ b/src/doc_reform/spine.d @@ -54,6 +54,7 @@ name "spine" description "A SiSU inspired document parser written in D." homepage "https://sisudoc.org" +/ +@safe: import std.algorithm, std.datetime, @@ -768,20 +769,20 @@ string program_name = "spine"; } } OptActions _opt_action = OptActions(); - @safe auto program_info() { + auto program_info() { struct ProgramInfo { - @safe string project() { + string project() { return project_name; } - @safe string name() { + string name() { return program_name; } - @safe string ver() { + string ver() { return format("%s.%s.%s", _ver.major, _ver.minor, _ver.patch, ); } - @safe string compiler() { + string compiler() { return format ("%s D:%s, %s %s", __VENDOR__, __VERSION__, bits, os, @@ -793,7 +794,7 @@ string program_name = "spine"; @trusted string name_version_and_compiler() { return format("%s-%s (%s)", name, ver, compiler); } - @safe auto time_output_generated() { + auto time_output_generated() { auto _st = Clock.currTime(UTC()); auto _t = TimeOfDay(_st.hour, _st.minute, _st.second); auto _time = _st.year.to!string -- cgit v1.2.3