Skip to content

Commit

Permalink
✨ Add safe annotations (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseKPhillips authored Jan 27, 2020
1 parent 2f5473a commit 8ef3552
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/structopt/attributes.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ module structopt.attributes;

import std.traits;

@safe:

/**
* Command Line Help Message for the arugement.
*/
Expand All @@ -22,6 +24,7 @@ struct Help {
* Command Line Argument Option which causes assignement to this field.
*/
struct Option {
@safe:
/**
* All argument options.
*/
Expand All @@ -34,7 +37,7 @@ struct Option {
* @Option("help", "h")
*/
this(string[] names...) {
this.names = names;
this.names = names.dup;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions source/structopt/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public import structopt.attributes;
public import std.getopt;
public import std.traits;

@safe:

/// Rename the Option struct of getopt
alias GetOption = std.getopt.Option;
/// Reastablish the name for the struct attributes
Expand Down

0 comments on commit 8ef3552

Please sign in to comment.